Fix crash on invalid IPv6 DNS

Closes #325
This commit is contained in:
emanuele-f 2023-06-13 20:35:00 +02:00
parent 4e96623130
commit 5a139aaf6c

View File

@ -428,7 +428,7 @@ public class CaptureService extends VpnService implements Runnable {
try {
builder.addDnsServer(InetAddress.getByName(Prefs.getDnsServerV6(mPrefs)));
} catch (UnknownHostException e) {
} catch (UnknownHostException | IllegalArgumentException e) {
Log.w(TAG, "Could not set IPv6 DNS server");
}
}