Skip to content

Commit

Permalink
Merge ee05ae0 into c929c6a
Browse files Browse the repository at this point in the history
  • Loading branch information
bluca committed Apr 25, 2024
2 parents c929c6a + ee05ae0 commit 7cd876d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/libsystemd-network/sd-radv.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,8 @@ int sd_radv_add_prefix(sd_radv *ra, sd_radv_prefix *p) {
const char *addr_p = IN6_ADDR_PREFIX_TO_STRING(&p->opt.in6_addr, p->opt.prefixlen);

LIST_FOREACH(prefix, cur, ra->prefixes) {
r = in6_addr_prefix_intersect(&cur->opt.in6_addr, cur->opt.prefixlen,
&p->opt.in6_addr, p->opt.prefixlen);
if (r < 0)
return r;
if (r == 0)
if (!in6_addr_prefix_intersect(&cur->opt.in6_addr, cur->opt.prefixlen,
&p->opt.in6_addr, p->opt.prefixlen))
continue; /* no intersection */

if (cur->opt.prefixlen == p->opt.prefixlen) {
Expand Down

0 comments on commit 7cd876d

Please sign in to comment.