summaryrefslogtreecommitdiff
path: root/staticd/static_zebra.c
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2018-11-08 19:47:27 +0000
committerDon Slice <dslice@cumulusnetworks.com>2018-11-12 15:08:11 +0000
commita9be49bcbc95f2a4098cec7692a9d8dfef52b0f5 (patch)
treebe9ab48b0ce2b6fffeffb515b41a37e8e0ac15d1 /staticd/static_zebra.c
parent6987aacd7af2f3802d7b1bca3ef8d6d9868b5121 (diff)
staticd: install static routes in a vrf when next-hop interface comes up
Problem reported with cross-vrf static routes that the routes weren't installed when the target interface is bounced. Determined that we did not initiate re-install of the statics in that particular case, so added it. Test case previously failing now passes. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'staticd/static_zebra.c')
-rw-r--r--staticd/static_zebra.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c
index 4e168e142c..b228611de7 100644
--- a/staticd/static_zebra.c
+++ b/staticd/static_zebra.c
@@ -122,11 +122,17 @@ static int interface_state_up(int command, struct zclient *zclient,
ifp = zebra_interface_if_lookup(zclient->ibuf);
- if (ifp && if_is_vrf(ifp)) {
- struct static_vrf *svrf = static_vrf_lookup_by_id(vrf_id);
+ if (ifp) {
+ if (if_is_vrf(ifp)) {
+ struct static_vrf *svrf =
+ static_vrf_lookup_by_id(vrf_id);
- static_fixup_vrf_ids(svrf);
- static_config_install_delayed_routes(svrf);
+ static_fixup_vrf_ids(svrf);
+ static_config_install_delayed_routes(svrf);
+ }
+
+ /* Install any static reliant on this interface coming up */
+ static_install_intf_nh(ifp);
}
return 0;