mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix behaviour of empty dhcp-option=option6:dns-server, which should inhibit sending option.
This commit is contained in:
@@ -1320,15 +1320,16 @@ static struct dhcp_netid *add_options(struct state *state, int do_refresh)
|
|||||||
|
|
||||||
if (opt_cfg->opt == OPTION6_REFRESH_TIME)
|
if (opt_cfg->opt == OPTION6_REFRESH_TIME)
|
||||||
done_refresh = 1;
|
done_refresh = 1;
|
||||||
|
|
||||||
|
if (opt_cfg->opt == OPTION6_DNS_SERVER)
|
||||||
|
done_dns = 1;
|
||||||
|
|
||||||
if (opt_cfg->flags & DHOPT_ADDR6)
|
/* Empty DNS_SERVER option will not set DHOPT_ADDR6 */
|
||||||
|
if ((opt_cfg->flags & DHOPT_ADDR6) || opt_cfg->opt == OPTION6_DNS_SERVER)
|
||||||
{
|
{
|
||||||
int len, j;
|
int len, j;
|
||||||
struct in6_addr *a;
|
struct in6_addr *a;
|
||||||
|
|
||||||
if (opt_cfg->opt == OPTION6_DNS_SERVER)
|
|
||||||
done_dns = 1;
|
|
||||||
|
|
||||||
for (a = (struct in6_addr *)opt_cfg->val, len = opt_cfg->len, j = 0;
|
for (a = (struct in6_addr *)opt_cfg->val, len = opt_cfg->len, j = 0;
|
||||||
j < opt_cfg->len; j += IN6ADDRSZ, a++)
|
j < opt_cfg->len; j += IN6ADDRSZ, a++)
|
||||||
if ((IN6_IS_ADDR_ULA_ZERO(a) && IN6_IS_ADDR_UNSPECIFIED(state->ula_addr)) ||
|
if ((IN6_IS_ADDR_ULA_ZERO(a) && IN6_IS_ADDR_UNSPECIFIED(state->ula_addr)) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user