diff options
| author | Stephen Worley <sworley@nvidia.com> | 2022-01-26 00:23:07 -0500 |
|---|---|---|
| committer | Stephen Worley <sworley@nvidia.com> | 2022-03-09 17:52:44 -0500 |
| commit | f9a1140c9a512972bd9d2ebe1d650f29e93b7328 (patch) | |
| tree | 394e6ee3489c1571de1a2ff48668accfa6af31e9 /sharpd/sharp_zebra.c | |
| parent | 5d4141383344bf244c572f9d23c0175d9573f41d (diff) | |
sharpd: add support for setting protodown
Add support for setting protodown via sharpd. This is just useful
for testing. We can make use of this in topotests.
Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'sharpd/sharp_zebra.c')
| -rw-r--r-- | sharpd/sharp_zebra.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index 313febd9bb..e33dbeb97c 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -968,6 +968,18 @@ static int sharp_zebra_process_srv6_locator_chunk(ZAPI_CALLBACK_ARGS) return 0; } +int sharp_zebra_send_interface_protodown(struct interface *ifp, bool down) +{ + zlog_debug("Sending zebra to set %s protodown %s", ifp->name, + down ? "on" : "off"); + + if (zclient_send_interface_protodown(zclient, ifp->vrf->vrf_id, ifp, + down) == ZCLIENT_SEND_FAILURE) + return -1; + + return 0; +} + static zclient_handler *const sharp_handlers[] = { [ZEBRA_INTERFACE_ADDRESS_ADD] = interface_address_add, [ZEBRA_INTERFACE_ADDRESS_DELETE] = interface_address_delete, |
