diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-01-26 21:09:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 21:09:30 +0200 |
| commit | 5db3bb0de95c6828bc8eda807f679ca2a7a68f8d (patch) | |
| tree | 21346e75befa0753fc1a1e6588509fa9d32037a8 /sharpd/sharp_zebra.c | |
| parent | d48b99ad4f1cc89e375ec1ae16c89f67dd00d79a (diff) | |
| parent | 3d97d2679f036722072fd078848604ca965f1037 (diff) | |
Merge pull request #15237 from donaldsharp/sharp_watch_neighbors_more
sharpd: Add ability to turn off watching of redistribution
Diffstat (limited to 'sharpd/sharp_zebra.c')
| -rw-r--r-- | sharpd/sharp_zebra.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index f4947540d2..133da918fa 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -704,10 +704,11 @@ static int sharp_redistribute_route(ZAPI_CALLBACK_ARGS) return 0; } -void sharp_redistribute_vrf(struct vrf *vrf, int type) +void sharp_redistribute_vrf(struct vrf *vrf, int type, bool turn_on) { - zebra_redistribute_send(ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP, type, - 0, vrf->vrf_id); + zebra_redistribute_send(turn_on ? ZEBRA_REDISTRIBUTE_ADD + : ZEBRA_REDISTRIBUTE_DELETE, + zclient, AFI_IP, type, 0, vrf->vrf_id); } static zclient_handler *const sharp_opaque_handlers[] = { |
