From: Daniel Lenski Date: Sun, 17 May 2020 06:03:48 +0000 (-0700) Subject: don't solicit DNS/NBNS servers unless we have neither X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3ac7789d3c4657952000ac765bb9b5b908e2424d;p=users%2Fdwmw2%2Fopenconnect.git don't solicit DNS/NBNS servers unless we have neither Saves a CONFREQ/CONFNAK-offer round-trip Signed-off-by: Daniel Lenski --- diff --git a/ppp.c b/ppp.c index 6cba421b..d6fe9692 100644 --- a/ppp.c +++ b/ppp.c @@ -218,10 +218,8 @@ int openconnect_ppp_new(struct openconnect_info *vpninfo, /* Nameservers to request from peer * (see https://tools.ietf.org/html/rfc1877#section-1) */ ppp->solicit_peerns = 0; - if (!vpninfo->ip_info.dns[0]) - ppp->solicit_peerns |= IPCP_DNS0|IPCP_DNS1; - if (!vpninfo->ip_info.nbns[0]) - ppp->solicit_peerns |= IPCP_NBNS0|IPCP_NBNS1; + if (!vpninfo->ip_info.dns[0] && !vpninfo->ip_info.nbns[0]) + ppp->solicit_peerns |= IPCP_DNS0|IPCP_DNS1|IPCP_NBNS0|IPCP_NBNS1; /* Outgoing IPv4 address and IPv6 interface identifier (64 LSBs), * if already configured via another mechanism */