summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index f4242b0b..fd3e239f 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -347,7 +347,12 @@ ospf_if_is_configured (struct ospf *ospf, struct in_addr *address)
for (ALL_LIST_ELEMENTS (ospf->oiflist, node, nnode, oi))
if (oi->type != OSPF_IFTYPE_VIRTUALLINK)
{
- if (oi->type == OSPF_IFTYPE_POINTOPOINT)
+ if (CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED))
+ {
+ if (htonl(oi->ifp->ifindex) == address->s_addr)
+ return oi;
+ }
+ else if (oi->type == OSPF_IFTYPE_POINTOPOINT)
{
/* special leniency: match if addr is anywhere on peer subnet */
if (prefix_match(CONNECTED_PREFIX(oi->connected),
@@ -471,8 +476,10 @@ ospf_if_lookup_recv_if (struct ospf *ospf, struct in_addr src,
if (if_is_loopback (oi->ifp))
continue;
- if (prefix_match (CONNECTED_PREFIX(oi->connected),
- (struct prefix *) &addr))
+ if (CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED))
+ match = oi;
+ else if (prefix_match (CONNECTED_PREFIX(oi->connected),
+ (struct prefix *) &addr))
{
if ( (match == NULL) ||
(match->address->prefixlen < oi->address->prefixlen)
@@ -866,6 +873,11 @@ ospf_vl_new (struct ospf *ospf, struct ospf_vl_data *vl_data)
snprintf (ifname, sizeof(ifname), "VLINK%d", vlink_count);
vi = if_create (ifname, strnlen(ifname, sizeof(ifname)));
+ /*
+ * if_create sets ZEBRA_INTERFACE_LINKDETECTION
+ * virtual links don't need this.
+ */
+ UNSET_FLAG (vi->status, ZEBRA_INTERFACE_LINKDETECTION);
co = connected_new ();
co->ifp = vi;
listnode_add (vi->connected, co);