mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 15:47:22 +00:00
pimd: Determining if we are the RP should happen always
When creating new RP information from a `ip pim rp A.B.C.D/M A.B.C.D` we should determine if we are the RP even if we can or cannot determine if we have a path to the RP via RPF. This is because we should determine if we are the RP based upon a connected ip address match not whether or not we have a path to the RPF. We would normally think this is not important but RPF is inherently asynchronous and we can have a state where we have registered for nht but have not received the actual path back yet from zebra. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
2ccc414b19
commit
5bd5131435
@ -564,6 +564,9 @@ int pim_rp_new(struct pim_instance *pim, const char *rp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pim_rp_check_interfaces(pim, rp_all);
|
||||||
|
pim_rp_refresh_group_to_rp_mapping(pim);
|
||||||
|
|
||||||
memset(&pnc, 0, sizeof(struct pim_nexthop_cache));
|
memset(&pnc, 0, sizeof(struct pim_nexthop_cache));
|
||||||
if (pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_all,
|
if (pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_all,
|
||||||
&pnc)) {
|
&pnc)) {
|
||||||
@ -578,8 +581,7 @@ int pim_rp_new(struct pim_instance *pim, const char *rp,
|
|||||||
&nht_p, &rp_all->group, 1))
|
&nht_p, &rp_all->group, 1))
|
||||||
return PIM_RP_NO_PATH;
|
return PIM_RP_NO_PATH;
|
||||||
}
|
}
|
||||||
pim_rp_check_interfaces(pim, rp_all);
|
|
||||||
pim_rp_refresh_group_to_rp_mapping(pim);
|
|
||||||
return PIM_SUCCESS;
|
return PIM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -646,6 +648,9 @@ int pim_rp_new(struct pim_instance *pim, const char *rp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pim_rp_check_interfaces(pim, rp_info);
|
||||||
|
pim_rp_refresh_group_to_rp_mapping(pim);
|
||||||
|
|
||||||
/* Register addr with Zebra NHT */
|
/* Register addr with Zebra NHT */
|
||||||
nht_p.family = AF_INET;
|
nht_p.family = AF_INET;
|
||||||
nht_p.prefixlen = IPV4_MAX_BITLEN;
|
nht_p.prefixlen = IPV4_MAX_BITLEN;
|
||||||
@ -671,8 +676,6 @@ int pim_rp_new(struct pim_instance *pim, const char *rp,
|
|||||||
return PIM_RP_NO_PATH;
|
return PIM_RP_NO_PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
pim_rp_check_interfaces(pim, rp_info);
|
|
||||||
pim_rp_refresh_group_to_rp_mapping(pim);
|
|
||||||
return PIM_SUCCESS;
|
return PIM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user