diff options
Diffstat (limited to 'proto/radv/radv.c')
-rw-r--r-- | proto/radv/radv.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/proto/radv/radv.c b/proto/radv/radv.c index 6370e006..97713b95 100644 --- a/proto/radv/radv.c +++ b/proto/radv/radv.c @@ -143,7 +143,7 @@ find_lladdr(struct iface *iface) { struct ifa *a; WALK_LIST(a, iface->addrs) - if (a->scope == SCOPE_LINK) + if ((a->prefix.type == NET_IP6) && (a->scope == SCOPE_LINK)) return a; return NULL; @@ -258,9 +258,7 @@ radv_ifa_notify(struct proto *p, unsigned flags, struct ifa *a) static inline int radv_net_match_trigger(struct radv_config *cf, net *n) { - return cf->trigger_valid && - (n->n.pxlen == cf->trigger_pxlen) && - ipa_equal(n->n.prefix, cf->trigger_prefix); + return cf->trigger_valid && net_equal(n->n.addr, cf->trigger); } int @@ -306,8 +304,7 @@ radv_check_active(struct proto_radv *ra) if (! cf->trigger_valid) return 1; - return rt_examine(ra->p.table, cf->trigger_prefix, cf->trigger_pxlen, - &(ra->p), ra->p.cf->out_filter); + return rt_examine(ra->p.table, cf->trigger, &ra->p, ra->p.cf->out_filter); } static struct proto * |