diff options
Diffstat (limited to 'proto/radv')
-rw-r--r-- | proto/radv/radv.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/proto/radv/radv.c b/proto/radv/radv.c index 7e8950c5..22e4b2f4 100644 --- a/proto/radv/radv.c +++ b/proto/radv/radv.c @@ -281,17 +281,6 @@ radv_iface_add(struct object_lock *lock) radv_iface_notify(ifa, RA_EV_INIT); } -static inline struct ifa * -find_lladdr(struct iface *iface) -{ - struct ifa *a; - WALK_LIST(a, iface->addrs) - if (a->scope == SCOPE_LINK) - return a; - - return NULL; -} - static void radv_iface_new(struct radv_proto *p, struct iface *iface, struct radv_iface_config *cf) { @@ -305,18 +294,12 @@ radv_iface_new(struct radv_proto *p, struct iface *iface, struct radv_iface_conf ifa->ra = p; ifa->cf = cf; ifa->iface = iface; + ifa->addr = iface->llv6; init_list(&ifa->prefixes); ifa->prune_time = TIME_INFINITY; add_tail(&p->iface_list, NODE ifa); - ifa->addr = find_lladdr(iface); - if (!ifa->addr) - { - log(L_ERR "%s: Missing link-local address on interface %s", p->p.name, iface->name); - return; - } - timer *tm = tm_new(pool); tm->hook = radv_timer; tm->data = ifa; @@ -360,6 +343,10 @@ radv_if_notify(struct proto *P, unsigned flags, struct iface *iface) struct radv_iface_config *ic = (struct radv_iface_config *) iface_patt_find(&cf->patt_list, iface, NULL); + /* Ignore ifaces without link-local address */ + if (!iface->llv6) + return; + if (ic) radv_iface_new(p, iface, ic); |