mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 20:13:53 +00:00
bgpd: Fix occassional turn off of extended-nexthop for an if
Sometimes, like once every 400 iterations, when you restart Quagga, extended-nexthop has been turned off for interface based config( for 5549 ). Examining the code, there is only 1 real path to setting the PEER_FLAG_CAPABILITITY_ENHE and that is through peer_conf_interface_get. Modify this code path to always set the PEER_FLAG_CAPABILITY_ENHE if it is not already set. In addition, fix a possible pointer dereference. Ticket: CM-12929 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
77566facad
commit
1f0a6ed1f1
@ -2714,7 +2714,10 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi,
|
|||||||
peer = peer_create (NULL, conf_if, bgp, bgp->as, as, as_type, afi, safi,
|
peer = peer_create (NULL, conf_if, bgp, bgp->as, as, as_type, afi, safi,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (peer && v6only)
|
if (!peer)
|
||||||
|
return CMD_WARNING;
|
||||||
|
|
||||||
|
if (v6only)
|
||||||
SET_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY);
|
SET_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY);
|
||||||
|
|
||||||
/* Request zebra to initiate IPv6 RAs on this interface. We do this
|
/* Request zebra to initiate IPv6 RAs on this interface. We do this
|
||||||
@ -2723,11 +2726,8 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi,
|
|||||||
* gets deleted later etc.)
|
* gets deleted later etc.)
|
||||||
*/
|
*/
|
||||||
if (peer->ifp)
|
if (peer->ifp)
|
||||||
{
|
|
||||||
bgp_zebra_initiate_radv (bgp, peer);
|
bgp_zebra_initiate_radv (bgp, peer);
|
||||||
}
|
}
|
||||||
peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE);
|
|
||||||
}
|
|
||||||
else if ((v6only && !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)) ||
|
else if ((v6only && !CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)) ||
|
||||||
(!v6only && CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)))
|
(!v6only && CHECK_FLAG(peer->flags, PEER_FLAG_IFPEER_V6ONLY)))
|
||||||
{
|
{
|
||||||
@ -2747,8 +2747,8 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi,
|
|||||||
bgp_session_reset(peer);
|
bgp_session_reset(peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!peer)
|
if (!CHECK_FLAG (peer->flags, PEER_FLAG_CAPABILITY_ENHE))
|
||||||
return CMD_WARNING;
|
peer_flag_set (peer, PEER_FLAG_CAPABILITY_ENHE);
|
||||||
|
|
||||||
if (peer_group_name)
|
if (peer_group_name)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user