aboutgitcodebugslistschat
path: root/dhcpv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6.c')
-rw-r--r--dhcpv6.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dhcpv6.c b/dhcpv6.c
index e4113bc..b79a8e9 100644
--- a/dhcpv6.c
+++ b/dhcpv6.c
@@ -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);