summaryrefslogtreecommitdiff
path: root/zebra/zebra_ns.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-04-08 19:10:24 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2020-04-10 11:05:06 -0400
commitab35be755ff5902cd0887fdbd4ee753f2969d136 (patch)
treebe0c3cb25df078ee47da6615e9452db379eff2ea /zebra/zebra_ns.c
parentb6d34c260939cdcf7bba327108d2de35fc58fb54 (diff)
zebra: read in and sweep rules on startup
On startup of zebra, read in all ipv4/ipv6 rules from the kernel and remove any with the zebra proto. If there are any, this means we failed to remove them on shutdown due to a crash or something. Without this, users have to manually remove them with iproute2 or some such and its really annoying. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_ns.c')
-rw-r--r--zebra/zebra_ns.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c
index 3287176ef5..4e51437337 100644
--- a/zebra/zebra_ns.c
+++ b/zebra/zebra_ns.c
@@ -126,6 +126,7 @@ int zebra_ns_enable(ns_id_t ns_id, void **info)
kernel_init(zns);
interface_list(zns);
route_read(zns);
+ kernel_read_pbr_rules(zns);
/* Initiate Table Manager per ZNS */
table_manager_enable(ns_id);