diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-09-03 18:39:53 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-09-03 18:39:53 +0200 |
commit | 1ca42c8d84a3682a890f5cbcff760456df2e54a6 (patch) | |
tree | bd7c442b2b03333fdd8373b20f9c27a077e536eb /bgpd/bgp_vty.c | |
parent | Merge pull request #9538 from donaldsharp/bgp_view_not_working (diff) | |
download | frr-1ca42c8d84a3682a890f5cbcff760456df2e54a6.tar.xz frr-1ca42c8d84a3682a890f5cbcff760456df2e54a6.zip |
bgpd: fix "no router bgp X vrf default"
Currently, "vrf default" modifier is not processed correctly and we get
the `% Can't find BGP instance` error.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r-- | bgpd/bgp_vty.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 92b74dd7c..1e47a4cb7 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1387,8 +1387,12 @@ DEFUN (no_router_bgp, } else { as = strtoul(argv[idx_asn]->arg, NULL, 10); - if (argc > 4) + if (argc > 4) { name = argv[idx_vrf]->arg; + if (strmatch(argv[idx_vrf - 1]->text, "vrf") + && strmatch(name, VRF_DEFAULT_NAME)) + name = NULL; + } /* Lookup bgp structure. */ bgp = bgp_lookup(as, name); |