summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-08-27 00:07:04 +0200
committerDonald Sharp <sharpd@nvidia.com>2023-09-10 14:31:25 +0200
commitd2ba78929f63d49e78140f28995cc745c1c95966 (patch)
tree71d85bcef551397e7699670cea25fd3744a27a03 /bgpd/bgp_zebra.c
parentbgpd: peer_established should be connection oriented (diff)
downloadfrr-d2ba78929f63d49e78140f28995cc745c1c95966.tar.xz
frr-d2ba78929f63d49e78140f28995cc745c1c95966.zip
bgpd: bgp_fsm_change_status/BGP_TIMER_ON and BGP_EVENT_ADD
Modify bgp_fsm_change_status to be connection oriented and also make the BGP_TIMER_ON and BGP_EVENT_ADD macros connection oriented as well. Attempt to make peer_xfer_conn a bit more understandable because, frankly it was/is confusing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 1020e4330..3d993e12c 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -143,8 +143,8 @@ static void bgp_start_interface_nbrs(struct bgp *bgp, struct interface *ifp)
if (peer->conf_if && (strcmp(peer->conf_if, ifp->name) == 0) &&
!peer_established(peer->connection)) {
if (peer_active(peer))
- BGP_EVENT_ADD(peer, BGP_Stop);
- BGP_EVENT_ADD(peer, BGP_Start);
+ BGP_EVENT_ADD(peer->connection, BGP_Stop);
+ BGP_EVENT_ADD(peer->connection, BGP_Start);
}
}
}
@@ -183,7 +183,7 @@ static void bgp_nbr_connected_delete(struct bgp *bgp, struct nbr_connected *ifc,
if (peer->conf_if
&& (strcmp(peer->conf_if, ifc->ifp->name) == 0)) {
peer->last_reset = PEER_DOWN_NBR_ADDR_DEL;
- BGP_EVENT_ADD(peer, BGP_Stop);
+ BGP_EVENT_ADD(peer->connection, BGP_Stop);
}
}
/* Free neighbor also, if we're asked to. */
@@ -279,7 +279,7 @@ static int bgp_ifp_down(struct interface *ifp)
continue;
if (ifp == peer->nexthop.ifp) {
- BGP_EVENT_ADD(peer, BGP_Stop);
+ BGP_EVENT_ADD(peer->connection, BGP_Stop);
peer->last_reset = PEER_DOWN_IF_DOWN;
}
}
@@ -515,7 +515,8 @@ static int bgp_interface_vrf_update(ZAPI_CALLBACK_ARGS)
continue;
if (ifp == peer->nexthop.ifp)
- BGP_EVENT_ADD(peer, BGP_Stop);
+ BGP_EVENT_ADD(peer->connection,
+ BGP_Stop);
}
}
}