mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 21:50:39 +00:00
pimd: pimd crashes during neighbor clean up
RCA: It has asserted because during neighbor delete on a interface, pim_number_of_nonlandelay_neighbors count has become less less than 0. This was due to not updating the count when hello option changed. Fix: During hello option update, check and increment or decrement when this option changes. Signed-off-by: Saravanan K <saravanank@vmware.com>
This commit is contained in:
parent
7f2ccbe562
commit
b3a474d82e
@ -779,6 +779,7 @@ void pim_neighbor_update(struct pim_neighbor *neigh,
|
|||||||
uint32_t dr_priority, struct list *addr_list)
|
uint32_t dr_priority, struct list *addr_list)
|
||||||
{
|
{
|
||||||
struct pim_interface *pim_ifp = neigh->interface->info;
|
struct pim_interface *pim_ifp = neigh->interface->info;
|
||||||
|
uint32_t old, new;
|
||||||
|
|
||||||
/* Received holdtime ? */
|
/* Received holdtime ? */
|
||||||
if (PIM_OPTION_IS_SET(hello_options, PIM_OPTION_MASK_HOLDTIME)) {
|
if (PIM_OPTION_IS_SET(hello_options, PIM_OPTION_MASK_HOLDTIME)) {
|
||||||
@ -818,6 +819,16 @@ void pim_neighbor_update(struct pim_neighbor *neigh,
|
|||||||
neigh->prefix_list = addr_list;
|
neigh->prefix_list = addr_list;
|
||||||
|
|
||||||
update_dr_priority(neigh, hello_options, dr_priority);
|
update_dr_priority(neigh, hello_options, dr_priority);
|
||||||
|
new = PIM_OPTION_IS_SET(hello_options, PIM_OPTION_MASK_LAN_PRUNE_DELAY);
|
||||||
|
old = PIM_OPTION_IS_SET(neigh->hello_options,
|
||||||
|
PIM_OPTION_MASK_LAN_PRUNE_DELAY);
|
||||||
|
|
||||||
|
if (old != new) {
|
||||||
|
if (old)
|
||||||
|
++pim_ifp->pim_number_of_nonlandelay_neighbors;
|
||||||
|
else
|
||||||
|
--pim_ifp->pim_number_of_nonlandelay_neighbors;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
Copy flags
|
Copy flags
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user