diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-09-04 18:38:56 +0200 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-09-04 18:38:56 +0200 |
commit | c14b7f18f63490c9e8b9c298904abaa7c2cef8a6 (patch) | |
tree | f08354550bda304fd4504331f5034ca378d3c763 /staticd | |
parent | Merge pull request #4877 from mjstapp/dplane_neighs (diff) | |
download | frr-c14b7f18f63490c9e8b9c298904abaa7c2cef8a6.tar.xz frr-c14b7f18f63490c9e8b9c298904abaa7c2cef8a6.zip |
staticd: Re-send/Remove routes on interface events
We were not processing interface up/down events for device only
static routes. This patch looks up the ifp and then calls
the same API we are using for interface add/remove events.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'staticd')
-rw-r--r-- | staticd/static_zebra.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 13c04259d..27605da63 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -130,6 +130,7 @@ static int interface_state_up(ZAPI_CALLBACK_ARGS) /* Install any static reliant on this interface coming up */ static_install_intf_nh(ifp); + static_ifindex_update(ifp, true); } return 0; @@ -137,7 +138,12 @@ static int interface_state_up(ZAPI_CALLBACK_ARGS) static int interface_state_down(ZAPI_CALLBACK_ARGS) { - zebra_interface_state_read(zclient->ibuf, vrf_id); + struct interface *ifp; + + ifp = zebra_interface_state_read(zclient->ibuf, vrf_id); + + if (ifp) + static_ifindex_update(ifp, false); return 0; } |