diff options
Diffstat (limited to 'src/net/java/sip/communicator/impl/dns')
7 files changed, 276 insertions, 151 deletions
diff --git a/src/net/java/sip/communicator/impl/dns/ConfigurableDnssecResolver.java b/src/net/java/sip/communicator/impl/dns/ConfigurableDnssecResolver.java index b793e01..78cf98a 100644 --- a/src/net/java/sip/communicator/impl/dns/ConfigurableDnssecResolver.java +++ b/src/net/java/sip/communicator/impl/dns/ConfigurableDnssecResolver.java @@ -63,17 +63,9 @@ public class ConfigurableDnssecResolver public ConfigurableDnssecResolver()
{
super();
- String forwarders = DnsUtilActivator.getConfigurationService()
- .getString(DnsUtilActivator.PNAME_DNSSEC_NAMESERVERS);
- if(!StringUtils.isNullOrEmpty(forwarders, true))
- {
- if(logger.isTraceEnabled())
- {
- logger.trace("Setting DNSSEC forwarders to: "
- + Arrays.toString(forwarders.split(",")));
- }
- super.setForwarders(forwarders.split(","));
- }
+ reset();
+ Lookup.setDefaultResolver(this);
+
DnsUtilActivator.getNotificationService().
registerDefaultNotificationForEvent(
ConfigurableDnssecResolver.EVENT_TYPE,
@@ -290,7 +282,9 @@ public class ConfigurableDnssecResolver for(DnssecDialogResult r : DnssecDialogResult.values())
{
JButton cmd = new JButton(R.getI18NString(
- DnssecDialogResult.class.getName() + "." + r.name()));
+ "net.java.sip.communicator.util.dns."
+ + "ConfigurableDnssecResolver$DnssecDialogResult."
+ + r.name()));
cmd.setActionCommand(r.name());
cmd.addActionListener(this);
pnlAdvancedButtons.add(cmd);
@@ -354,4 +348,34 @@ public class ConfigurableDnssecResolver {
return PNAME_BASE_DNSSEC_PIN + "." + fqdn.replace(".", "__");
}
+
+ /**
+ * Reloads the configuration of forwarders and trust anchors.
+ */
+ public void reset()
+ {
+ String forwarders = DnsUtilActivator.getConfigurationService()
+ .getString(DnsUtilActivator.PNAME_DNSSEC_NAMESERVERS);
+ if(!StringUtils.isNullOrEmpty(forwarders, true))
+ {
+ if(logger.isTraceEnabled())
+ {
+ logger.trace("Setting DNSSEC forwarders to: "
+ + Arrays.toString(forwarders.split(",")));
+ }
+ super.setForwarders(forwarders.split(","));
+ }
+
+ for(int i = 1;;i++)
+ {
+ String anchor = DnsUtilActivator.getResources().getSettingsString(
+ "net.java.sip.communicator.util.dns.DS_ROOT." + i);
+ if(anchor == null)
+ break;
+ clearTrustAnchors();
+ addTrustAnchor(anchor);
+ if(logger.isTraceEnabled())
+ logger.trace("Loaded trust anchor " + anchor);
+ }
+ }
}
diff --git a/src/net/java/sip/communicator/impl/dns/DnsUtilActivator.java b/src/net/java/sip/communicator/impl/dns/DnsUtilActivator.java index fd086c5..2eb8c75 100644 --- a/src/net/java/sip/communicator/impl/dns/DnsUtilActivator.java +++ b/src/net/java/sip/communicator/impl/dns/DnsUtilActivator.java @@ -8,6 +8,8 @@ package net.java.sip.communicator.impl.dns; import net.java.sip.communicator.impl.dns.dnsconfig.*; import net.java.sip.communicator.service.dns.*; +import net.java.sip.communicator.service.netaddr.*; +import net.java.sip.communicator.service.netaddr.event.*; import net.java.sip.communicator.service.notification.*; import net.java.sip.communicator.service.resources.*; import net.java.sip.communicator.util.*; @@ -24,8 +26,13 @@ import org.xbill.DNS.*; * @author Ingo Bauersachs */ public class DnsUtilActivator - implements BundleActivator + implements BundleActivator, + ServiceListener { + /** Class logger */ + private static final Logger logger + = Logger.getLogger(DnsUtilActivator.class); + /** * The name of the property that sets custom nameservers to use for all DNS * lookups when DNSSEC is enabled. Multiple servers are separated by a comma @@ -34,21 +41,54 @@ public class DnsUtilActivator public static final String PNAME_DNSSEC_NAMESERVERS = "net.java.sip.communicator.util.dns.DNSSEC_NAMESERVERS"; - /** - * The <tt>Logger</tt> used by the <tt>UtilActivator</tt> class and its - * instances for logging output. - */ - private static final Logger logger - = Logger.getLogger(DnsUtilActivator.class); - private static ConfigurationService configurationService; private static NotificationService notificationService; private static ResourceManagementService resourceService; private static BundleContext bundleContext; - private static DnsConfigActivator dnsConfigActivator; /** + * The address of the backup resolver we would use by default. + */ + public static final String DEFAULT_BACKUP_RESOLVER + = "backup-resolver.jitsi.net"; + + /** + * The name of the property that users may use to override the port + * of our backup DNS resolver. + */ + public static final String PNAME_BACKUP_RESOLVER_PORT + = "net.java.sip.communicator.util.dns.BACKUP_RESOLVER_PORT"; + + /** + * The name of the property that users may use to override the + * IP address of our backup DNS resolver. This is only used when the + * backup resolver name cannot be determined. + */ + public static final String PNAME_BACKUP_RESOLVER_FALLBACK_IP + = "net.java.sip.communicator.util.dns.BACKUP_RESOLVER_FALLBACK_IP"; + + /** + * The default of the property that users may use to disable + * our backup DNS resolver. + */ + public static final boolean PDEFAULT_BACKUP_RESOLVER_ENABLED = true; + + /** + * The name of the property that users may use to disable + * our backup DNS resolver. + */ + public static final String PNAME_BACKUP_RESOLVER_ENABLED + = "net.java.sip.communicator.util.dns.BACKUP_RESOLVER_ENABLED"; + + /** + * The name of the property that users may use to override the + * address of our backup DNS resolver. + */ + public static final String PNAME_BACKUP_RESOLVER + = "net.java.sip.communicator.util.dns.BACKUP_RESOLVER"; + + /** * Calls <tt>Thread.setUncaughtExceptionHandler()</tt> * * @param context The execution context of the bundle being started @@ -62,56 +102,82 @@ public class DnsUtilActivator throws Exception { bundleContext = context; + context.addServiceListener(this); - bundleContext.registerService( - ParallelResolver.class.getName(), - new ParallelResolverImpl(), - null); + if(UtilActivator.getConfigurationService().getBoolean( + DnsUtilActivator.PNAME_BACKUP_RESOLVER_ENABLED, + DnsUtilActivator.PDEFAULT_BACKUP_RESOLVER_ENABLED) + && !getConfigurationService().getBoolean( + CustomResolver.PNAME_DNSSEC_RESOLVER_ENABLED, + CustomResolver.PDEFAULT_DNSSEC_RESOLVER_ENABLED)) + { + bundleContext.registerService( + CustomResolver.class.getName(), + new ParallelResolverImpl(), + null); + } if(getConfigurationService().getBoolean( - ParallelResolverImpl.PNAME_DNSSEC_RESOLVER_ENABLED, - ParallelResolverImpl.PDEFAULT_DNSSEC_RESOLVER_ENABLED)) + CustomResolver.PNAME_DNSSEC_RESOLVER_ENABLED, + CustomResolver.PDEFAULT_DNSSEC_RESOLVER_ENABLED)) { - getNotificationService(). - registerDefaultNotificationForEvent( - ConfigurableDnssecResolver.EVENT_TYPE, - NotificationAction.ACTION_POPUP_MESSAGE, - null, null); + bundleContext.registerService( + CustomResolver.class.getName(), + new ConfigurableDnssecResolver(), + null); } - refreshResolver(); dnsConfigActivator = new DnsConfigActivator(); dnsConfigActivator.start(context); } /** - * Sets a DNSSEC resolver as default resolver on lookup when DNSSEC is - * enabled; creates a standard lookup otherwise. + * Listens when network is going from down to up and + * resets dns configuration. */ - public static void refreshResolver() + private static class NetworkListener + implements NetworkConfigurationChangeListener { - if(getConfigurationService().getBoolean( - ParallelResolverImpl.PNAME_DNSSEC_RESOLVER_ENABLED, - ParallelResolverImpl.PDEFAULT_DNSSEC_RESOLVER_ENABLED)) + /** + * Fired when a change has occurred in the + * computer network configuration. + * + * @param event the change event. + */ + public void configurationChanged(ChangeEvent event) { - logger.trace("DNSSEC is enabled"); - ConfigurableDnssecResolver res = new ConfigurableDnssecResolver(); - for(int i = 1;;i++) + if((event.getType() == ChangeEvent.IFACE_UP + || event.getType() == ChangeEvent.DNS_CHANGE) + && !event.isInitial()) { - String anchor = getResources().getSettingsString( - "net.java.sip.communicator.util.dns.DS_ROOT." + i); - if(anchor == null) - break; - res.addTrustAnchor(anchor); - if(logger.isTraceEnabled()) - logger.trace("Loaded trust anchor " + anchor); + reloadDnsResolverConfig(); } - Lookup.setDefaultResolver(res); } - else + } + + /** + * Reloads dns server configuration in the resolver. + */ + public static void reloadDnsResolverConfig() + { + // reread system dns configuration + ResolverConfig.refresh(); + if(logger.isTraceEnabled()) { - logger.trace("DNSSEC is disabled, refresh default config"); - Lookup.refreshDefault(); + StringBuilder sb = new StringBuilder(); + sb.append("Reloaded resolver config, default DNS servers are: "); + for(String s : ResolverConfig.getCurrentConfig().servers()) + { + sb.append(s); + sb.append(", "); + } + logger.trace(sb.toString()); + } + + // now reset an eventually present custom resolver + if(Lookup.getDefaultResolver() instanceof CustomResolver) + { + ((CustomResolver)Lookup.getDefaultResolver()).reset(); } } @@ -180,4 +246,25 @@ public class DnsUtilActivator } return resourceService; } + + /** + * Listens on OSGi service changes and registers a listener for network + * changes as soon as the change-notification service is available + */ + public void serviceChanged(ServiceEvent event) + { + if (event.getType() != ServiceEvent.REGISTERED) + { + return; + } + + Object service = bundleContext.getService(event.getServiceReference()); + if (!(service instanceof NetworkAddressManagerService)) + { + return; + } + + ((NetworkAddressManagerService)service) + .addNetworkConfigurationChangeListener(new NetworkListener()); + } } diff --git a/src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java b/src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java index bd317b3..054a6e4 100644 --- a/src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java +++ b/src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java @@ -6,6 +6,7 @@ */ package net.java.sip.communicator.impl.dns; +import java.beans.*; import java.io.*; import java.net.*; import java.util.*; @@ -35,7 +36,7 @@ import org.xbill.DNS.*; * @author Emil Ivov */ public class ParallelResolverImpl - implements ParallelResolver + implements CustomResolver, PropertyChangeListener { /** * The <tt>Logger</tt> used by the <tt>ParallelResolver</tt> @@ -51,39 +52,12 @@ public class ParallelResolverImpl private static boolean redundantMode = false; /** - * The default number of milliseconds it takes us to get into redundant - * mode while waiting for a DNS query response. - */ - public static final int DNS_PATIENCE = 1500; - - /** - * The name of the property that allows us to override the default - * <tt>DNS_PATIENCE</tt> value. - */ - public static final String PNAME_DNS_PATIENCE - = "net.java.sip.communicator.util.dns.DNS_PATIENCE"; - - /** * The currently configured number of milliseconds that we need to wait * before entering redundant mode. */ private static long currentDnsPatience = DNS_PATIENCE; /** - * The default number of times that the primary DNS would have to provide a - * faster response than the backup resolver before we consider it safe - * enough to exit redundant mode. - */ - public static final int DNS_REDEMPTION = 3; - - /** - * The name of the property that allows us to override the default - * <tt>DNS_REDEMPTION</tt> value. - */ - public static final String PNAME_DNS_REDEMPTION - = "net.java.sip.communicator.util.dns.DNS_REDEMPTION"; - - /** * The currently configured number of times that the primary DNS would have * to provide a faster response than the backup resolver before we consider * it safe enough to exit redundant mode. @@ -106,9 +80,17 @@ public class ParallelResolverImpl /** * The default resolver that we use if everything works properly. */ - private static Resolver defaultResolver; + private Resolver defaultResolver; + + /** + * An extended resolver that would be encapsulating all backup resolvers. + */ + private ExtendedResolver backupResolver; - static + /** + * Creates a new instance of this class. + */ + ParallelResolverImpl() { try { @@ -120,57 +102,67 @@ public class ParallelResolverImpl throw new RuntimeException("Failed to initialize resolver"); } + DnsUtilActivator.getConfigurationService() + .addPropertyChangeListener(this); initProperties(); + Lookup.setDefaultResolver(this); } - /** - * Default resolver property initialisation - */ - private static void initProperties() + private void initProperties() { + String rslvrAddrStr + = UtilActivator.getConfigurationService().getString( + DnsUtilActivator.PNAME_BACKUP_RESOLVER, + DnsUtilActivator.DEFAULT_BACKUP_RESOLVER); + String customResolverIP + = UtilActivator.getConfigurationService().getString( + DnsUtilActivator.PNAME_BACKUP_RESOLVER_FALLBACK_IP, + UtilActivator.getResources().getSettingsString( + DnsUtilActivator.PNAME_BACKUP_RESOLVER_FALLBACK_IP)); + + InetAddress resolverAddress = null; try { - currentDnsPatience = DnsUtilActivator.getConfigurationService() - .getLong(PNAME_DNS_PATIENCE, DNS_PATIENCE); - currentDnsRedemption - = DnsUtilActivator.getConfigurationService() - .getInt(PNAME_DNS_REDEMPTION, DNS_REDEMPTION); + resolverAddress = NetworkUtils.getInetAddress(rslvrAddrStr); } - catch(Throwable t) + catch(UnknownHostException exc) { - //we don't want messed up properties to screw up DNS resolution - //so we just log. - logger.info("Failed to initialize DNS resolver properties", t); + logger.warn("Oh! Seems like our primary DNS is down!" + + "Don't panic! We'll try to fall back to " + + customResolverIP); } - } + if(resolverAddress == null) + { + // name resolution failed for backup DNS resolver, + // try with the IP address of the default backup resolver + try + { + resolverAddress = NetworkUtils.getInetAddress(customResolverIP); + } + catch (UnknownHostException e) + { + // this shouldn't happen, but log anyway + logger.error(e); + } + } - /** - * Replaces the default resolver used by this class. Mostly meant for - * debugging. - * - * @param resolver the resolver we'd like to use by default from now on. - */ - public void setDefaultResolver(Resolver resolver) - { - defaultResolver = resolver; - } + int resolverPort = UtilActivator.getConfigurationService().getInt( + DnsUtilActivator.PNAME_BACKUP_RESOLVER_PORT, + SimpleResolver.DEFAULT_PORT); - /** - * Returns the default resolver used by this class. Mostly meant for - * debugging. - * - * @return the resolver this class consults first. - */ - public Resolver getDefaultResolver() - { - return defaultResolver; - } + InetSocketAddress resolverSockAddr + = new InetSocketAddress(resolverAddress, resolverPort); - /** - * An extended resolver that would be encapsulating all backup resolvers. - */ - private ExtendedResolver backupResolver; + setBackupServers(new InetSocketAddress[]{ resolverSockAddr }); + + currentDnsPatience = DnsUtilActivator.getConfigurationService() + .getLong(PNAME_DNS_PATIENCE, DNS_PATIENCE); + + currentDnsRedemption + = DnsUtilActivator.getConfigurationService() + .getInt(PNAME_DNS_REDEMPTION, DNS_REDEMPTION); + } /** * Sets the specified array of <tt>backupServers</tt> used if the default @@ -179,7 +171,7 @@ public class ParallelResolverImpl * @param backupServers the list of backup DNS servers that we should use * if, and only if, the default servers don't seem to work that well. */ - public void setBackupServers(InetSocketAddress[] backupServers) + private void setBackupServers(InetSocketAddress[] backupServers) { try { @@ -188,7 +180,6 @@ public class ParallelResolverImpl { SimpleResolver sr = new SimpleResolver(); sr.setAddress(backupServer); - backupResolver.addResolver(sr); } } @@ -393,6 +384,7 @@ public class ParallelResolverImpl */ public void reset() { + Lookup.refreshDefault(); ExtendedResolver resolver = (ExtendedResolver)defaultResolver; // remove old ones @@ -415,7 +407,9 @@ public class ParallelResolverImpl } } else + { resolver.addResolver(new SimpleResolver()); + } } catch (UnknownHostException e) { @@ -692,12 +686,23 @@ public class ParallelResolverImpl } } - /** - * Sets a DNSSEC resolver as default resolver on lookup when DNSSEC is - * enabled; creates a standard lookup otherwise. - */ - public void refreshResolver() + @SuppressWarnings("serial") + private final Set<String> configNames = new HashSet<String>(5) + {{ + add(DnsUtilActivator.PNAME_BACKUP_RESOLVER); + add(DnsUtilActivator.PNAME_BACKUP_RESOLVER_FALLBACK_IP); + add(DnsUtilActivator.PNAME_BACKUP_RESOLVER_PORT); + add(CustomResolver.PNAME_DNS_PATIENCE); + add(CustomResolver.PNAME_DNS_REDEMPTION); + }}; + + public void propertyChange(PropertyChangeEvent evt) { - DnsUtilActivator.refreshResolver(); + if (!configNames.contains(evt.getPropertyName())) + { + return; + } + + initProperties(); } } diff --git a/src/net/java/sip/communicator/impl/dns/UnboundResolver.java b/src/net/java/sip/communicator/impl/dns/UnboundResolver.java index 0f29795..92ab06b 100644 --- a/src/net/java/sip/communicator/impl/dns/UnboundResolver.java +++ b/src/net/java/sip/communicator/impl/dns/UnboundResolver.java @@ -23,7 +23,7 @@ import org.xbill.DNS.*; * @author Ingo Bauersachs
*/
public class UnboundResolver
- implements Resolver
+ implements CustomResolver
{
private final static Logger logger =
Logger.getLogger(UnboundResolver.class);
@@ -94,6 +94,14 @@ public class UnboundResolver }
/**
+ * Clears any existing trust anchors previously added.
+ */
+ public void clearTrustAnchors()
+ {
+ trustAnchors.clear();
+ }
+
+ /**
* Adds a DNSSEC trust anchor validation of the DNSKEYs.
*
* @param anchor trust anchor in the form of
@@ -136,7 +144,7 @@ public class UnboundResolver if(logger.isDebugEnabled() && secureMessage != null)
logger.debug(secureMessage);
}
-
+
return secureMessage;
}
});
@@ -381,4 +389,11 @@ public class UnboundResolver {
timeout = secs * 1000 + msecs;
}
+
+ /**
+ * Does nothing.
+ */
+ public void reset()
+ {
+ }
}
diff --git a/src/net/java/sip/communicator/impl/dns/dns.manifest.mf b/src/net/java/sip/communicator/impl/dns/dns.manifest.mf index 3157e6e..619c311 100644 --- a/src/net/java/sip/communicator/impl/dns/dns.manifest.mf +++ b/src/net/java/sip/communicator/impl/dns/dns.manifest.mf @@ -15,6 +15,8 @@ Import-Package: org.jitsi.util, net.java.sip.communicator.service.notification, net.java.sip.communicator.service.dns, net.java.sip.communicator.service.gui,
+ net.java.sip.communicator.service.netaddr,
+ net.java.sip.communicator.service.netaddr.event,
org.jitsi.service.configuration,
sun.net.dns,
org.xbill.DNS,
diff --git a/src/net/java/sip/communicator/impl/dns/dnsconfig/DnssecPanel.java b/src/net/java/sip/communicator/impl/dns/dnsconfig/DnssecPanel.java index e7f88d4..8e7928f 100644 --- a/src/net/java/sip/communicator/impl/dns/dnsconfig/DnssecPanel.java +++ b/src/net/java/sip/communicator/impl/dns/dnsconfig/DnssecPanel.java @@ -203,8 +203,8 @@ public class DnssecPanel )
);
chkEnabled.setSelected(config.getBoolean(
- ParallelResolver.PNAME_DNSSEC_RESOLVER_ENABLED,
- ParallelResolver.PDEFAULT_DNSSEC_RESOLVER_ENABLED
+ CustomResolver.PNAME_DNSSEC_RESOLVER_ENABLED,
+ CustomResolver.PDEFAULT_DNSSEC_RESOLVER_ENABLED
));
chkAbsolute.setSelected(config.getBoolean(
NetworkUtils.PNAME_DNS_ALWAYS_ABSOLUTE,
@@ -262,7 +262,7 @@ public class DnssecPanel chkEnabled.setSelected(true);
}
config.setProperty(
- ParallelResolver.PNAME_DNSSEC_RESOLVER_ENABLED,
+ CustomResolver.PNAME_DNSSEC_RESOLVER_ENABLED,
chkEnabled.isSelected());
}
catch (Exception ex)
@@ -341,7 +341,7 @@ public class DnssecPanel config.setProperty(
DnsUtilActivator.PNAME_DNSSEC_NAMESERVERS,
txtNameservers.getText());
- NetworkUtils.reloadDnsResolverConfig();
+ DnsUtilActivator.reloadDnsResolverConfig();
}
}
diff --git a/src/net/java/sip/communicator/impl/dns/dnsconfig/ParallelDnsPanel.java b/src/net/java/sip/communicator/impl/dns/dnsconfig/ParallelDnsPanel.java index 0059d11..0506e96 100644 --- a/src/net/java/sip/communicator/impl/dns/dnsconfig/ParallelDnsPanel.java +++ b/src/net/java/sip/communicator/impl/dns/dnsconfig/ParallelDnsPanel.java @@ -6,19 +6,9 @@ */ package net.java.sip.communicator.impl.dns.dnsconfig; -import static net.java.sip.communicator.util.NetworkUtils.DEFAULT_BACKUP_RESOLVER; -import static net.java.sip.communicator.util.NetworkUtils.PDEFAULT_BACKUP_RESOLVER_ENABLED; -import static net.java.sip.communicator.util.NetworkUtils.PNAME_BACKUP_RESOLVER; -import static net.java.sip.communicator.util.NetworkUtils.PNAME_BACKUP_RESOLVER_ENABLED; -import static net.java.sip.communicator.util.NetworkUtils.PNAME_BACKUP_RESOLVER_FALLBACK_IP; -import static net.java.sip.communicator.util.NetworkUtils.PNAME_BACKUP_RESOLVER_PORT; -import static net.java.sip.communicator.util.NetworkUtils.getDefaultDnsPort; -import static net.java.sip.communicator.util.NetworkUtils.isIPv4Address; -import static net.java.sip.communicator.util.NetworkUtils.isIPv6Address; -import static net.java.sip.communicator.service.dns.ParallelResolver.DNS_PATIENCE; -import static net.java.sip.communicator.service.dns.ParallelResolver.DNS_REDEMPTION; -import static net.java.sip.communicator.service.dns.ParallelResolver.PNAME_DNS_PATIENCE; -import static net.java.sip.communicator.service.dns.ParallelResolver.PNAME_DNS_REDEMPTION; +import static net.java.sip.communicator.util.NetworkUtils.*; +import static net.java.sip.communicator.service.dns.CustomResolver.*; +import static net.java.sip.communicator.impl.dns.DnsUtilActivator.*; import java.awt.*; import java.awt.event.*; @@ -29,6 +19,7 @@ import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; +import net.java.sip.communicator.impl.dns.*; import net.java.sip.communicator.plugin.desktoputil.*; import net.java.sip.communicator.service.dns.*; import net.java.sip.communicator.util.*; @@ -36,6 +27,7 @@ import net.java.sip.communicator.util.*; import org.jitsi.service.configuration.*; import org.jitsi.service.resources.*; import org.osgi.framework.*; +import org.xbill.DNS.*; /** * Page inside the advanced configuration options that allow the user to @@ -208,8 +200,8 @@ public class ParallelDnsPanel public void updateDnssecState() { boolean isDnssec = configService.getBoolean( - ParallelResolver.PNAME_DNSSEC_RESOLVER_ENABLED, - ParallelResolver.PDEFAULT_DNSSEC_RESOLVER_ENABLED); + CustomResolver.PNAME_DNSSEC_RESOLVER_ENABLED, + CustomResolver.PDEFAULT_DNSSEC_RESOLVER_ENABLED); if(isDnssec) chkBackupDnsEnabled.setSelected(false); chkBackupDnsEnabled.setEnabled(!isDnssec); @@ -376,7 +368,7 @@ public class ParallelDnsPanel PNAME_BACKUP_RESOLVER_FALLBACK_IP, R.getSettingsString(PNAME_BACKUP_RESOLVER_FALLBACK_IP))); spnBackupResolverPort.setValue(configService.getInt( - PNAME_BACKUP_RESOLVER_PORT, getDefaultDnsPort())); + PNAME_BACKUP_RESOLVER_PORT, SimpleResolver.DEFAULT_PORT)); spnDnsTimeout.setValue(configService.getInt( PNAME_DNS_PATIENCE, DNS_PATIENCE)); spnDnsRedemption.setValue(configService.getInt( |