diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-12-16 13:34:43 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2021-04-12 19:23:53 +0200 |
commit | f468a45af26433c70f61ff4df1c6dd30c551cbc5 (patch) | |
tree | 0d1c053570af7c4a29d69eb9da98f26ce7049cfa /nhrpd/netlink_arp.c | |
parent | topotests: add standard nhrp test between spoke and hub (diff) | |
download | frr-f468a45af26433c70f61ff4df1c6dd30c551cbc5.tar.xz frr-f468a45af26433c70f61ff4df1c6dd30c551cbc5.zip |
nhrpd: add a zebra api to configure neighbor table per interface
neighbor table per interface is being configured per interface, via
zebra api.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'nhrpd/netlink_arp.c')
-rw-r--r-- | nhrpd/netlink_arp.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c index bf5d74c25..4cca177c9 100644 --- a/nhrpd/netlink_arp.c +++ b/nhrpd/netlink_arp.c @@ -219,35 +219,3 @@ void netlink_init(void) if (netlink_req_fd < 0) return; } - -int netlink_configure_arp(unsigned int ifindex, int pf) -{ - struct nlmsghdr *n; - struct ndtmsg *ndtm; - struct rtattr *rta; - struct zbuf *zb = zbuf_alloc(512); - int r; - - n = znl_nlmsg_push(zb, RTM_SETNEIGHTBL, NLM_F_REQUEST | NLM_F_REPLACE); - ndtm = znl_push(zb, sizeof(*ndtm)); - *ndtm = (struct ndtmsg){ - .ndtm_family = pf, - }; - - znl_rta_push(zb, NDTA_NAME, pf == AF_INET ? "arp_cache" : "ndisc_cache", - 10); - - rta = znl_rta_nested_push(zb, NDTA_PARMS); - znl_rta_push_u32(zb, NDTPA_IFINDEX, ifindex); - znl_rta_push_u32(zb, NDTPA_APP_PROBES, 1); - znl_rta_push_u32(zb, NDTPA_MCAST_PROBES, 0); - znl_rta_push_u32(zb, NDTPA_UCAST_PROBES, 0); - znl_rta_nested_complete(zb, rta); - - znl_nlmsg_complete(zb, n); - r = zbuf_send(zb, netlink_req_fd); - zbuf_recv(zb, netlink_req_fd); - zbuf_free(zb); - - return r; -} |