]> git.puffer.fish Git - matthieu/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)
committerBrian Rak <brianrak@gameservers.com>
Mon, 14 Aug 2017 21:25:12 +0000 (17:25 -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 f9dbac2f71be1c7d4694f560655e3d99e676bdc8..d7733fbacd3db1a70602abb44f36b811445ab186 100644 (file)
@@ -6190,11 +6190,14 @@ static void bgp_config_write_filter(struct vty *vty, struct peer *peer,
                                           addr, filter->plist[in].name);
                }
 
-       if (filter->plist[out].name && !gfilter) {
-               afi_header_vty_out(vty, afi, safi, write,
-                                  "  neighbor %s prefix-list %s out\n", addr,
-                                  filter->plist[out].name);
-       }
+       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\n",
+                                           addr, filter->plist[out].name);
+                }
 
        /* route-map. */
        if (filter->map[RMAP_IN].name)