summaryrefslogtreecommitdiffstats
path: root/proto/ospf/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/iface.c')
-rw-r--r--proto/ospf/iface.c17
1 files changed, 17 insertions, 0 deletions
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;