]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix display bgp large-community exact-match
authorYour Name <you@example.com>
Mon, 10 Oct 2022 10:51:27 +0000 (13:51 +0300)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 11 Oct 2022 06:57:37 +0000 (06:57 +0000)
Before patch:
frr# show bgp large-community 1:1:1 exact-match
% Large-community malformed

After patch:
frr# show bgp large-community 1:1:1 exact-match

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
(cherry picked from commit 1857760c1ed38250d6be0d92502f9dc816d4e4cc)

bgpd/bgp_route.c

index 70b28cf74a3adc393f9acef63d09307deb644ff9..8fb62fa3d3e4289347049d486cd089cbb049ea4a 100644 (file)
@@ -12044,8 +12044,10 @@ DEFUN (show_ip_bgp_large_community,
                return CMD_WARNING;
 
        if (argv_find(argv, argc, "AA:BB:CC", &idx)) {
-               if (argv_find(argv, argc, "exact-match", &idx))
+               if (argv_find(argv, argc, "exact-match", &idx)) {
+                       argc--;
                        exact_match = 1;
+               }
                return bgp_show_lcommunity(vty, bgp, argc, argv,
                                        exact_match, afi, safi, uj);
        } else