Add --no-dhcpv4-interface and --no-dhcpv6-interface options.

This commit is contained in:
Simon Kelley
2023-04-12 22:55:14 +01:00
parent 597378cdf5
commit aaba66efbd
10 changed files with 51 additions and 15 deletions

View File

@@ -186,7 +186,8 @@ void icmp6_packet(time_t now)
return;
for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
if (tmp->name && wildcard_match(tmp->name, interface))
if (tmp->name && (tmp->flags & INAME_6) &&
wildcard_match(tmp->name, interface))
return;
if (packet[1] != 0)
@@ -835,7 +836,8 @@ time_t periodic_ra(time_t now)
{
struct iname *tmp;
for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
if (tmp->name && wildcard_match(tmp->name, param.name))
if (tmp->name && (tmp->flags & INAME_6) &&
wildcard_match(tmp->name, param.name))
break;
if (!tmp)
{
@@ -934,7 +936,8 @@ static int iface_search(struct in6_addr *local, int prefix,
return 1;
for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
if (tmp->name && wildcard_match(tmp->name, param->name))
if (tmp->name && (tmp->flags & INAME_6) &&
wildcard_match(tmp->name, param->name))
return 1;
for (context = daemon->dhcp6; context; context = context->next)