From b49e6f5a65d437cb7e7bdefe8397e0f550496012 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 25 Aug 2009 16:42:14 +0200 Subject: Temporary OSPFv3 development commit --- proto/ospf/iface.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'proto/ospf/iface.c') diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index ea3baa2..cae36ad 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -420,6 +420,23 @@ ospf_iface_new(struct proto_ospf *po, struct iface *iface, #ifdef OSPFv3 ifa->instance_id = ip->instance_id; + + ifa->lladdr = IPA_NONE; + + /* Find link-local address */ + if (ifa->type != OSPF_IT_VLINK) + { + struct ifa *a; + WALK_LIST(a, iface->addrs) + if (a->scope == SCOPE_LINK) + { + ifa->lladdr = a->ip; + break; + } + + if (! ipa_nonzero(ifa->lladdr)) + log(L_WARN "%s: Missing link local address on interface %s", p->name, iface->name); + } #endif ifa->rxbuf = ip->rxbuf; -- cgit v1.2.3