From 6a17b1a0f25419bca715b16355afbc700b6fedc5 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 16 Mar 2018 18:45:29 -0400 Subject: zebra: Extend unknown vrf to vrf part of ip route When specifying a ip route: ip route 4.3.2.0/24 192.168.201.1 vrf DONNA Accept DONNA even if it has not been created yet. Signed-off-by: Donald Sharp --- zebra/zebra_vty.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'zebra/zebra_vty.c') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index d0e252992..9ae60e011 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -798,7 +798,7 @@ DEFPY(ip_route_address_interface, ifname = NULL; } - zvrf = zebra_vrf_lookup_by_name(vrf); + zvrf = zebra_vty_get_unknown_vrf(vty, vrf); if (!zvrf) { vty_out(vty, "%% vrf %s is not defined\n", vrf); return CMD_WARNING_CONFIG_FAILED; @@ -905,7 +905,7 @@ DEFPY(ip_route, ifname = NULL; } - zvrf = zebra_vrf_lookup_by_name(vrf); + zvrf = zebra_vty_get_unknown_vrf(vty, vrf); if (!zvrf) { vty_out(vty, "%% vrf %s is not defined\n", vrf); return CMD_WARNING_CONFIG_FAILED; @@ -2409,7 +2409,7 @@ DEFPY(ipv6_route_address_interface, struct zebra_vrf *zvrf; struct zebra_vrf *nh_zvrf; - zvrf = zebra_vrf_lookup_by_name(vrf); + zvrf = zebra_vty_get_unknown_vrf(vty, vrf); if (!zvrf) { vty_out(vty, "%% vrf %s is not defined\n", vrf); return CMD_WARNING_CONFIG_FAILED; @@ -2503,7 +2503,7 @@ DEFPY(ipv6_route, struct zebra_vrf *zvrf; struct zebra_vrf *nh_zvrf; - zvrf = zebra_vrf_lookup_by_name(vrf); + zvrf = zebra_vty_get_unknown_vrf(vty, vrf); if (!zvrf) { vty_out(vty, "%% vrf %s is not defined\n", vrf); return CMD_WARNING_CONFIG_FAILED; -- cgit v1.2.3