summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/rt.h2
-rw-r--r--zebra/rt_netlink.c11
2 files changed, 11 insertions, 2 deletions
diff --git a/zebra/rt.h b/zebra/rt.h
index 0b14a3ef36..6d12d8ea2e 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -67,6 +67,8 @@ extern int kernel_del_mac(struct interface *ifp, vlanid_t vid,
extern int kernel_add_neigh(struct interface *ifp, struct ipaddr *ip,
struct ethaddr *mac, uint8_t flags);
extern int kernel_del_neigh(struct interface *ifp, struct ipaddr *ip);
+extern int kernel_upd_neigh(struct interface *ifp, struct ipaddr *ip,
+ struct ethaddr *mac, uint8_t flags, uint16_t state);
/*
* Southbound Initialization routines to get initial starting
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index ce2d25862d..fce09ba92d 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -2713,12 +2713,12 @@ static int netlink_neigh_update2(struct interface *ifp, struct ipaddr *ip,
addattr_l(&req.n, sizeof(req), NDA_LLADDR, mac, 6);
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("Tx %s family %s IF %s(%u) Neigh %s MAC %s flags 0x%x",
+ zlog_debug("Tx %s family %s IF %s(%u) Neigh %s MAC %s flags 0x%x state 0x%x",
nl_msg_type_to_str(cmd),
nl_family_to_str(req.ndm.ndm_family), ifp->name,
ifp->ifindex, ipaddr2str(ip, buf, sizeof(buf)),
mac ? prefix_mac2str(mac, buf2, sizeof(buf2))
- : "null", flags);
+ : "null", flags, state);
return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns,
0);
@@ -2749,6 +2749,13 @@ int kernel_del_neigh(struct interface *ifp, struct ipaddr *ip)
return netlink_neigh_update2(ifp, ip, NULL, 0, 0, RTM_DELNEIGH);
}
+int kernel_upd_neigh(struct interface *ifp, struct ipaddr *ip,
+ struct ethaddr *mac, uint8_t flags, uint16_t state)
+{
+ return netlink_neigh_update2(ifp, ip, mac, flags,
+ state, RTM_NEWNEIGH);
+}
+
/*
* MPLS label forwarding table change via netlink interface, using dataplane
* context information.