Commit 51931b88 authored by Simon Kelley's avatar Simon Kelley

Fix access control when DHCPv6 but no RA in use.

parent 9f7f3b12
...@@ -407,10 +407,11 @@ static int join_multicast_worker(struct in6_addr *local, int prefix, ...@@ -407,10 +407,11 @@ static int join_multicast_worker(struct in6_addr *local, int prefix,
return 1; return 1;
/* weird libvirt-inspired access control */ /* weird libvirt-inspired access control */
for (context = daemon->ra_contexts; context; context = context->next) for (context = daemon->ra_contexts ? daemon->ra_contexts : daemon->dhcp6;
context; context = context->next)
if (!context->interface || strcmp(context->interface, ifrn_name) == 0) if (!context->interface || strcmp(context->interface, ifrn_name) == 0)
break; break;
if (!context) if (!context)
return 1; return 1;
......
...@@ -2952,7 +2952,7 @@ static char *one_opt(int option, char *arg, char *gen_prob, int command_line) ...@@ -2952,7 +2952,7 @@ static char *one_opt(int option, char *arg, char *gen_prob, int command_line)
if (!atoi_check(comma, &val) || if (!atoi_check(comma, &val) ||
!(new->name = canonicalise_opt(arg)) || !(new->name = canonicalise_opt(arg)) ||
(data && (len = parse_hex(data, (unsigned char *)data, -1, NULL, NULL)) == -1)) (data && (len = parse_hex(data, (unsigned char *)data, -1, NULL, NULL)) == -1U))
{ {
problem = _("bad RR record"); problem = _("bad RR record");
break; break;
......
...@@ -158,7 +158,8 @@ void icmp6_packet(void) ...@@ -158,7 +158,8 @@ void icmp6_packet(void)
return; return;
/* weird libvirt-inspired access control */ /* weird libvirt-inspired access control */
for (context = daemon->ra_contexts; context; context = context->next) for (context = daemon->ra_contexts ? daemon->ra_contexts : daemon->dhcp6;
context; context = context->next)
if (!context->interface || strcmp(context->interface, interface) == 0) if (!context->interface || strcmp(context->interface, interface) == 0)
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment