summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/if.c b/lib/if.c
index ebd8f5e02d..d49b5acad7 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -1082,6 +1082,24 @@ connected_same_prefix (struct prefix *p1, struct prefix *p2)
}
struct connected *
+connected_lookup_prefix_exact (struct interface *ifp, struct prefix *p)
+{
+ struct listnode *node;
+ struct listnode *next;
+ struct connected *ifc;
+
+ for (node = listhead (ifp->connected); node; node = next)
+ {
+ ifc = listgetdata (node);
+ next = node->next;
+
+ if (connected_same_prefix (ifc->address, p))
+ return ifc;
+ }
+ return NULL;
+}
+
+struct connected *
connected_delete_by_prefix (struct interface *ifp, struct prefix *p)
{
struct listnode *node;