1
0
mirror of https://passt.top/passt synced 2024-12-22 13:45:32 +00:00

dhcpv6: Don't pass DNS option, it already comes from SLAAC

It looks like some versions of ISC's IPv6 dhclient not only discard
the DNS Recursive Name Server option if other options (Domain Search
List? FQDN?) are absent, but they also drop existing entries
configured via SLAAC from /etc/resolv.conf.

Don't pass option 23 until I figure this out, it's anyway redundant
as we pass DNS information via SLAAC (RFC 8106).

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-04-22 17:16:05 +02:00
parent 6488c3e848
commit 6fe3dca78a

View File

@ -210,7 +210,6 @@ static struct resp_t {
struct opt_server_id server_id; struct opt_server_id server_id;
struct opt_ia_na ia_na; struct opt_ia_na ia_na;
struct opt_ia_addr ia_addr; struct opt_ia_addr ia_addr;
struct opt_dns_servers dns_servers;
struct opt_client_id client_id; struct opt_client_id client_id;
} __attribute__((__packed__)) resp = { } __attribute__((__packed__)) resp = {
uh_resp, uh_resp,
@ -227,9 +226,6 @@ static struct resp_t {
IN6ADDR_ANY_INIT, (uint32_t)~0U, (uint32_t)~0U IN6ADDR_ANY_INIT, (uint32_t)~0U, (uint32_t)~0U
}, },
{ { OPT_DNS_SERVERS, OPT_SIZE(dns_servers), },
IN6ADDR_ANY_INIT
},
{ { OPT_CLIENTID, 0, }, { { OPT_CLIENTID, 0, },
{ 0 } { 0 }
@ -509,5 +505,4 @@ void dhcpv6_init(struct ctx *c)
memcpy(resp_not_on_link.server_id.duid_lladdr, c->mac, sizeof(c->mac)); memcpy(resp_not_on_link.server_id.duid_lladdr, c->mac, sizeof(c->mac));
resp.ia_addr.addr = c->addr6; resp.ia_addr.addr = c->addr6;
resp.dns_servers.addr = c->dns6;
} }