Skip to content

Commit

Permalink
Fix condition for filtering local DNS servers
Browse files Browse the repository at this point in the history
Previously local DNS servers were removed when LAN access was enabled.
Instead it should be the other way around. With LAN access one wants to use the local DNS servers.
  • Loading branch information
debfx committed Jan 7, 2019
1 parent 78d1696 commit 901cfcc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ public static List<InetAddress> getDns(Context context) {
// Remove local DNS servers when not routing LAN
boolean lan = prefs.getBoolean("lan", false);
boolean use_hosts = prefs.getBoolean("filter", false) && prefs.getBoolean("use_hosts", false);
if (lan && use_hosts) {
if (!lan && use_hosts) {
List<InetAddress> listLocal = new ArrayList<>();
try {
Enumeration<NetworkInterface> nis = NetworkInterface.getNetworkInterfaces();
Expand Down

0 comments on commit 901cfcc

Please sign in to comment.