Allow the add/delete to go through a intermediary function in
zebra_pbr.c instead of directly to the underlying os call. This
will allow future refinements to track the data a bit better
so that on shutdown we can delete the rules.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
/* Private functions */
/* Public functions */
+void zebra_pbr_add_rule(struct zebra_pbr_rule *rule, struct interface *ifp)
+{
+ kernel_add_pbr_rule(rule, ifp);
+}
+
+void zebra_pbr_del_rule(struct zebra_pbr_rule *rule, struct interface *ifp)
+{
+ kernel_del_pbr_rule(rule, ifp);
+}
+
/*
* Handle success or failure of rule (un)install in the kernel.
*/
struct zebra_pbr_action action;
};
+void zebra_pbr_add_rule(struct zebra_pbr_rule *rule, struct interface *ifp);
+void zebra_pbr_del_rule(struct zebra_pbr_rule *rule, struct interface *ifp);
/*
* Install specified rule for a specific interface.
if (zpr.filter.dst_port)
zpr.filter.filter_bm |= PBR_FILTER_DST_PORT;
- kernel_add_pbr_rule(&zpr, ifp);
+ zebra_pbr_add_rule(&zpr, ifp);
}
stream_failure: