diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-08-09 20:04:55 +0400 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-08-09 20:04:55 +0400 |
| commit | ed9fb826388618912c99b5c5fe8a5b3a9596f6dd (patch) | |
| tree | 1ca14a71e43bb7d8f13a9ae2177add67c560a003 | |
| parent | 9cdce038c51d259e4416c3e2f15d70e76c5e176f (diff) | |
bgpd: do not bounce peer when re-binding to current peer-group
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
| -rw-r--r-- | bgpd/bgpd.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index d30def0f07..75975b8d68 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2518,11 +2518,17 @@ int peer_group_bind(struct bgp *bgp, union sockunion *su, struct peer *peer, /* The peer exist, bind it to the peer-group */ if (peer) { - /* When the peer already belongs to peer group, check the + /* When the peer already belongs to a peer-group, check the * consistency. */ - if (peer_group_active(peer) - && strcmp(peer->group->name, group->name) != 0) - return BGP_ERR_PEER_GROUP_CANT_CHANGE; + if (peer_group_active(peer)) { + + /* The peer is already bound to the peer-group, + * nothing to do */ + if (strcmp(peer->group->name, group->name) == 0) + return 0; + else + return BGP_ERR_PEER_GROUP_CANT_CHANGE; + } /* The peer has not specified a remote-as, inherit it from the * peer-group */ |
