]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Don't print 'neighbor activate' if its default for IPv4 unicast AFI/SAFI
authorDinesh G Dutt <ddutt@cumulusnetworks.com>
Wed, 6 Jul 2016 13:50:23 +0000 (06:50 -0700)
committerDinesh G Dutt <ddutt@cumulusnetworks.com>
Wed, 6 Jul 2016 21:51:29 +0000 (14:51 -0700)
Ticket: CM-11460
Reviewed By: CCR-4927
Testing Done:

Quagga's default "show running" model is to only print the non-default config.
Historically, IPv4 unicast has always had a default 'activate' model unless
its been configured otherwise. In 3.0, we introduced a print of the 'activate'
statement for IPv4 unicast independent of whether it was the default or not.
This causes quagga reload to break as the user doesn't configure 'activate' for
IPv4 unicast, and so any config changes will also not have it. However 'show
running' will display it, causing quagga reload to think that the AFI/SAFI has
been deactivated and bounce the sessions incorrectly.

This patch reverts to the original quagga behavior/model of not printing the
'activate' line for IPv4 unicast if its the default.

bgpd/bgpd.c

index f23cc13725dcc5e23dd08671c33c01d4897da8e6..ca72d2403acc997954a24ea6d77be2db9a6f6585 100644 (file)
@@ -6621,9 +6621,17 @@ bgp_config_write_peer_af (struct vty *vty, struct bgp *bgp,
     {
       if (peer->afc[afi][safi])
         {
-          afi_header_vty_out (vty, afi, safi, write,
-                              "  neighbor %s activate%s",
-                              addr, VTY_NEWLINE);
+          if ((afi == AFI_IP) && (safi == SAFI_UNICAST))
+            {
+              if (bgp_flag_check (bgp, BGP_FLAG_NO_DEFAULT_IPV4))
+                {
+                  vty_out (vty, "  neighbor %s activate%s", addr, VTY_NEWLINE);
+                }
+            }
+          else
+            afi_header_vty_out (vty, afi, safi, write,
+                                "  neighbor %s activate%s",
+                                addr, VTY_NEWLINE);
         }
     }