diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-08-26 18:11:07 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-09-10 08:31:25 -0400 |
| commit | 7b1158b169f59729bdde704539371cd419fe2138 (patch) | |
| tree | 99838f12681fb1d1afad8600505fb68717e8f78d /bgpd/bgp_nexthop.c | |
| parent | d1e7215da064eab02be7c1874cab27a6b7d0cacf (diff) | |
bgpd: peer_established should be connection oriented
The peer_established function should be connection oriented.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_nexthop.c')
| -rw-r--r-- | bgpd/bgp_nexthop.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 6cb6d65c64..b3360cf974 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -409,11 +409,10 @@ void bgp_connected_add(struct bgp *bgp, struct connected *ifc) } for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { - if (peer->conf_if - && (strcmp(peer->conf_if, ifc->ifp->name) == 0) - && !peer_established(peer) - && !CHECK_FLAG(peer->flags, - PEER_FLAG_IFPEER_V6ONLY)) { + if (peer->conf_if && + (strcmp(peer->conf_if, ifc->ifp->name) == 0) && + !peer_established(peer->connection) && + !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)) { if (peer_active(peer)) BGP_EVENT_ADD(peer, BGP_Stop); BGP_EVENT_ADD(peer, BGP_Start); |
