diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2024-01-11 11:24:20 +0100 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2024-01-24 10:05:29 +0100 |
| commit | 2ee43c873eab781bdb7b226ebb0f8a7df32b214e (patch) | |
| tree | 0c44aef991892f754c8dd5353329932f9e629f1f /zebra/zapi_msg.c | |
| parent | 03d6a6d137aacc0bdc4dae2bd8d02c7afde37dd5 (diff) | |
lib,zebra: add zapi message to control noarp flag
Add a ZAPI message to control the setting of the IFF_NOARP flag.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 296bf12bb5..76cabd1bf0 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -3124,6 +3124,28 @@ stream_failure: } +static void zread_interface_set_arp(ZAPI_HANDLER_ARGS) +{ + struct stream *s = msg; + struct interface *ifp; + bool arp_enable; + vrf_id_t vrf_id = zvrf->vrf->vrf_id; + int ifindex; + + STREAM_GETL(s, ifindex); + STREAM_GETC(s, arp_enable); + ifp = if_lookup_by_index(ifindex, vrf_id); + + if (!ifp) + return; + + if_arp(ifp, arp_enable); + +stream_failure: + return; +} + + static void zread_vrf_label(ZAPI_HANDLER_ARGS) { struct interface *ifp; @@ -3905,6 +3927,7 @@ void (*const zserv_handlers[])(ZAPI_HANDLER_ARGS) = { [ZEBRA_REMOTE_MACIP_DEL] = zebra_vxlan_remote_macip_del, [ZEBRA_DUPLICATE_ADDR_DETECTION] = zebra_vxlan_dup_addr_detection, [ZEBRA_INTERFACE_SET_MASTER] = zread_interface_set_master, + [ZEBRA_INTERFACE_SET_ARP] = zread_interface_set_arp, [ZEBRA_PW_ADD] = zread_pseudowire, [ZEBRA_PW_DELETE] = zread_pseudowire, [ZEBRA_PW_SET] = zread_pseudowire, |
