diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-08-22 09:19:50 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-08-22 10:03:16 +0200 |
commit | f69f6f56f58bbbfd069fa8dd108e04aec6caf623 (patch) | |
tree | c3b39092148f9b92802e8d08537ef4208ee3f7a0 /staticd/static_vty.c | |
parent | lib: change vrf_is_mapped_on_netns API (diff) | |
download | frr-f69f6f56f58bbbfd069fa8dd108e04aec6caf623.tar.xz frr-f69f6f56f58bbbfd069fa8dd108e04aec6caf623.zip |
staticd: remove usage of vrf_is_backend_netns in staticd
this function had to be used only inside zebra ( this was written in the
header vrf.h). To keep the functionality, a more generic API is used.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'staticd/static_vty.c')
-rw-r--r-- | staticd/static_vty.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c index 98153f714..771d8d1de 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -766,7 +766,7 @@ DEFPY(ip_route_blackhole, "Table to configure\n" "The table number to configure\n") { - if (table_str && !vrf_is_backend_netns()) { + if (table_str && vrf && !vrf_is_mapped_on_netns(vrf_lookup_by_name(vrf))) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -805,7 +805,7 @@ DEFPY(ip_route_blackhole_vrf, VTY_DECLVAR_CONTEXT(vrf, vrf); struct static_vrf *svrf = vrf->info; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && !vrf_is_mapped_on_netns(vrf)) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -868,7 +868,7 @@ DEFPY(ip_route_address_interface, return CMD_WARNING_CONFIG_FAILED; } - if (table_str && !vrf_is_backend_netns()) { + if (table_str && vrf && !vrf_is_mapped_on_netns(vrf_lookup_by_name(vrf))) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -924,7 +924,7 @@ DEFPY(ip_route_address_interface_vrf, struct static_vrf *svrf = vrf->info; struct static_vrf *nh_svrf; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && !vrf_is_mapped_on_netns(vrf)) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -984,7 +984,7 @@ DEFPY(ip_route, struct static_vrf *nh_svrf; const char *flag = NULL; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && vrf && !vrf_is_mapped_on_netns(vrf_lookup_by_name(vrf))) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -1049,7 +1049,7 @@ DEFPY(ip_route_vrf, struct static_vrf *nh_svrf; const char *flag = NULL; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && !vrf_is_mapped_on_netns(vrf)) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -1104,7 +1104,7 @@ DEFPY(ipv6_route_blackhole, "Table to configure\n" "The table number to configure\n") { - if (table_str && !vrf_is_backend_netns()) { + if (table_str && vrf && !vrf_is_mapped_on_netns(vrf_lookup_by_name(vrf))) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -1144,7 +1144,7 @@ DEFPY(ipv6_route_blackhole_vrf, VTY_DECLVAR_CONTEXT(vrf, vrf); struct static_vrf *svrf = vrf->info; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && !vrf_is_mapped_on_netns(vrf)) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -1195,7 +1195,7 @@ DEFPY(ipv6_route_address_interface, struct static_vrf *svrf; struct static_vrf *nh_svrf; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && vrf && !vrf_is_mapped_on_netns(vrf_lookup_by_name(vrf))) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -1255,7 +1255,7 @@ DEFPY(ipv6_route_address_interface_vrf, struct static_vrf *svrf = vrf->info; struct static_vrf *nh_svrf; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && !vrf_is_mapped_on_netns(vrf)) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -1309,7 +1309,7 @@ DEFPY(ipv6_route, struct static_vrf *svrf; struct static_vrf *nh_svrf; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && vrf && !vrf_is_mapped_on_netns(vrf_lookup_by_name(vrf))) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; @@ -1368,7 +1368,7 @@ DEFPY(ipv6_route_vrf, struct static_vrf *svrf = vrf->info; struct static_vrf *nh_svrf; - if (table_str && !vrf_is_backend_netns()) { + if (table_str && !vrf_is_mapped_on_netns(vrf)) { vty_out(vty, "%% table param only available when running on netns-based vrfs\n"); return CMD_WARNING_CONFIG_FAILED; |