]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Check for per-peer outbound configuration, in addition to the peer-group config
authorBrian Rak <brianrak@gameservers.com>
Mon, 14 Aug 2017 21:22:03 +0000 (17:22 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 27 Oct 2017 13:04:39 +0000 (09:04 -0400)
When displaying the config, bgpd only checked for the existance of a peer-group prefix-list before
deciding to not display the outbound prefix-list.  This commit updates the outbound prefix-list
logic to match the inbound.

bgpd/bgpd.c

index 70e55e6d7b0925fa08623b7428e89dcb11af43aa..01dbd2902ac6a02c097e43eb5970c3c0e2e45934 100644 (file)
@@ -6142,11 +6142,15 @@ static void bgp_config_write_filter(struct vty *vty, struct peer *peer,
                                           VTY_NEWLINE);
                }
 
-       if (filter->plist[out].name && !gfilter) {
-               afi_header_vty_out(vty, afi, safi, write,
-                                  "  neighbor %s prefix-list %s out%s", addr,
-                                  filter->plist[out].name, VTY_NEWLINE);
-       }
+       if (filter->plist[out].name)
+               if (!gfilter || !gfilter->plist[out].name
+                   || strcmp(filter->plist[out].name, gfilter->plist[out].name)
+                   != 0) {
+                       afi_header_vty_out(vty, afi, safi, write,
+                                          "  neighbor %s prefix-list %s out%s",
+                                          addr, filter->plist[out].name,
+                                          VTY_NEWLINE);
+               }
 
        /* route-map. */
        if (filter->map[RMAP_IN].name)