summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2024-01-24 16:53:29 +0100
committerGitHub <noreply@github.com>2024-01-24 16:53:29 +0100
commitc3a66e5082069ec4adb67a309f8343bf66273928 (patch)
treec0043ff58521436dc06ecb1496837f9e0dae6e9e /lib
parentMerge pull request #15196 from idryzhov/nb-leaf-list (diff)
parentnhrpd: remove netlink_configure_arp declaration (diff)
downloadfrr-c3a66e5082069ec4adb67a309f8343bf66273928.tar.xz
frr-c3a66e5082069ec4adb67a309f8343bf66273928.zip
Merge pull request #15173 from louis-6wind/nhrp-noarp
nhrpd: unset noarp flag using a zapi message
Diffstat (limited to 'lib')
-rw-r--r--lib/zclient.c18
-rw-r--r--lib/zclient.h4
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 25c6e2b8e..51ebb5627 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -4520,6 +4520,24 @@ static void zclient_event(enum zclient_event event, struct zclient *zclient)
}
}
+enum zclient_send_status zclient_interface_set_arp(struct zclient *client,
+ struct interface *ifp,
+ bool arp_enable)
+{
+ struct stream *s;
+
+ s = client->obuf;
+ stream_reset(s);
+
+ zclient_create_header(s, ZEBRA_INTERFACE_SET_ARP, ifp->vrf->vrf_id);
+
+ stream_putl(s, ifp->ifindex);
+ stream_putc(s, arp_enable);
+
+ stream_putw_at(s, 0, stream_get_endp(s));
+ return zclient_send_message(client);
+}
+
enum zclient_send_status zclient_interface_set_master(struct zclient *client,
struct interface *master,
struct interface *slave)
diff --git a/lib/zclient.h b/lib/zclient.h
index 3027c2c37..1bf91064e 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -98,6 +98,7 @@ typedef enum {
ZEBRA_INTERFACE_UP,
ZEBRA_INTERFACE_DOWN,
ZEBRA_INTERFACE_SET_MASTER,
+ ZEBRA_INTERFACE_SET_ARP,
ZEBRA_INTERFACE_SET_PROTODOWN,
ZEBRA_ROUTE_ADD,
ZEBRA_ROUTE_DELETE,
@@ -1036,6 +1037,9 @@ extern int zclient_read_header(struct stream *s, int sock, uint16_t *size,
*/
extern bool zapi_parse_header(struct stream *zmsg, struct zmsghdr *hdr);
+extern enum zclient_send_status zclient_interface_set_arp(struct zclient *client,
+ struct interface *ifp,
+ bool arp_enable);
extern enum zclient_send_status
zclient_interface_set_master(struct zclient *client, struct interface *master,
struct interface *slave);