mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 21:10:28 +00:00
Update last reset reason on interface down or neighbor addr loss.
Ticket: Reviewed By: Testing Done: For interface-based peering, we don't update the reset reason to be interface down. Similarly, we don't update the reason to be loss of neighbor address (maybe due to RA loss). This patch addresses these limitations.
This commit is contained in:
parent
01961e304f
commit
e60480bd74
@ -491,7 +491,9 @@ const char *peer_down_str[] =
|
||||
"Multihop config change",
|
||||
"NSF peer closed the session",
|
||||
"Intf peering v6only config change",
|
||||
"BFD down received"
|
||||
"BFD down received",
|
||||
"Interface down",
|
||||
"Neighbor address lost"
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -222,6 +222,7 @@ bgp_nbr_connected_delete (struct bgp *bgp, struct nbr_connected *ifc, int del)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -344,7 +345,10 @@ bgp_interface_down (int command, struct zclient *zclient, zebra_size_t length,
|
||||
continue;
|
||||
|
||||
if (ifp == peer->nexthop.ifp)
|
||||
BGP_EVENT_ADD (peer, BGP_Stop);
|
||||
{
|
||||
BGP_EVENT_ADD (peer, BGP_Stop);
|
||||
peer->last_reset = PEER_DOWN_IF_DOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -834,6 +834,8 @@ struct peer
|
||||
#define PEER_DOWN_NSF_CLOSE_SESSION 22 /* NSF tcp session close */
|
||||
#define PEER_DOWN_V6ONLY_CHANGE 23 /* if-based peering v6only toggled */
|
||||
#define PEER_DOWN_BFD_DOWN 24 /* BFD down */
|
||||
#define PEER_DOWN_IF_DOWN 25 /* Interface down */
|
||||
#define PEER_DOWN_NBR_ADDR_DEL 26 /* Peer address lost */
|
||||
unsigned long last_reset_cause_size;
|
||||
u_char last_reset_cause[BGP_MAX_PACKET_SIZE];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user