diff options
Diffstat (limited to 'dhcpv6.c')
-rw-r--r-- | dhcpv6.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -394,6 +394,9 @@ static size_t dhcpv6_dns_fill(struct ctx *c, char *buf, int offset) char *p = NULL; int i; + if (c->no_dhcp_dns) + goto search; + for (i = 0; !IN6_IS_ADDR_UNSPECIFIED(&c->dns6[i]); i++) { if (!i) { srv = (struct opt_dns_servers *)(buf + offset); @@ -410,6 +413,10 @@ static size_t dhcpv6_dns_fill(struct ctx *c, char *buf, int offset) if (srv) srv->hdr.l = htons(srv->hdr.l); +search: + if (c->no_dhcp_dns_search) + return offset; + for (i = 0; *c->dns_search[i].n; i++) { if (!i) { srch = (struct opt_dns_search *)(buf + offset); |