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.
"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
{
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);
}
}
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;
+ }
}
}
#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];