From b2f25e1a17e601c687256715b50db109605c3a25 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 28 Aug 2023 13:04:26 -0400 Subject: bgpd: First pass of BGP_EVENT_ADD Pass through a bunch of BGP_EVENT_ADD's and make the code use a proper connection instead of a peer->connection. There still are a bunch of places where peer->connection is used and later commits will probably go through and clean these up more. Signed-off-by: Donald Sharp --- bgpd/bgp_nexthop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bgpd/bgp_nexthop.c') diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index e0f22ad4a0..729f5e6bbc 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -385,6 +385,7 @@ void bgp_connected_add(struct bgp *bgp, struct connected *ifc) struct bgp_connected_ref *bc; struct listnode *node, *nnode; struct peer *peer; + struct peer_connection *connection; addr = ifc->address; @@ -413,10 +414,10 @@ void bgp_connected_add(struct bgp *bgp, struct connected *ifc) (strcmp(peer->conf_if, ifc->ifp->name) == 0) && !peer_established(peer->connection) && !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)) { + connection = peer->connection; if (peer_active(peer)) - BGP_EVENT_ADD(peer->connection, - BGP_Stop); - BGP_EVENT_ADD(peer->connection, BGP_Start); + BGP_EVENT_ADD(connection, BGP_Stop); + BGP_EVENT_ADD(connection, BGP_Start); } } } else if (addr->family == AF_INET6) { -- cgit v1.2.3