summaryrefslogtreecommitdiff
path: root/zebra/zebra_neigh.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_neigh.c')
-rw-r--r--zebra/zebra_neigh.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/zebra/zebra_neigh.c b/zebra/zebra_neigh.c
index 0c3fb97afd..941088afd6 100644
--- a/zebra/zebra_neigh.c
+++ b/zebra/zebra_neigh.c
@@ -152,6 +152,19 @@ void zebra_neigh_del(struct interface *ifp, struct ipaddr *ip)
zebra_neigh_free(n);
}
+/* kernel neigh delete all for a given interface */
+void zebra_neigh_del_all(struct interface *ifp)
+{
+ struct zebra_neigh_ent *n, *nn;
+
+ if (IS_ZEBRA_DEBUG_NEIGH)
+ zlog_debug("zebra neigh delete all for interface %s/%d",
+ ifp->name, ifp->ifindex);
+
+ RB_FOREACH_SAFE (n, zebra_neigh_rb_head, &zneigh_info->neigh_rb_tree, nn)
+ zebra_neigh_del(ifp, &n->ip);
+}
+
/* kernel neigh add */
void zebra_neigh_add(struct interface *ifp, struct ipaddr *ip,
struct ethaddr *mac)