diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-08-28 13:04:26 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-09-10 08:31:25 -0400 |
| commit | b2f25e1a17e601c687256715b50db109605c3a25 (patch) | |
| tree | bc3c1324de782e7258b55166b5d239f9d8591bd8 /bgpd/bgp_nexthop.c | |
| parent | b57e023cc2da413990c28c8495e23e0fd06e02dc (diff) | |
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 <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_nexthop.c')
| -rw-r--r-- | bgpd/bgp_nexthop.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) { |
