]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix neighbor command with internal or external keyword and interface
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 30 Sep 2015 22:05:19 +0000 (15:05 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 30 Sep 2015 22:05:19 +0000 (15:05 -0700)
Ticket: CM-7737
Reviewed-by: CCR-3611
Testing: See bug

When configuring a bgp peer that already has some config hung off of it,
such as 'interface v6only' and then configuring remote-as internal/external
will not cause the config to be taken.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgpd.c

index e43fb5a5dbb81555068297e1b726ef79b44ce5a9..61a416ab71aca62769350cc18c1a28a27a55e02f 100644 (file)
@@ -1543,7 +1543,7 @@ peer_remote_as (struct bgp *bgp, union sockunion *su, const char *conf_if,
        }
 
       /* Existing peer's AS number change. */
-      if (peer->as != *as)
+      if ((peer->as != *as) || (peer->as_type != as_type))
        peer_as_change (peer, *as, as_type);
     }
   else
@@ -2265,7 +2265,7 @@ peer_group_remote_as (struct bgp *bgp, const char *group_name,
 
   for (ALL_LIST_ELEMENTS (group->peer, node, nnode, peer))
     {
-      if (peer->as != *as)
+      if ((peer->as != *as) || (peer->as_type != as_type))
        peer_as_change (peer, *as, as_type);
     }