mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
pimd: Send hello immediately with receive of new genid
When we receive a new genid from a neighbor, we need to form the neigbhor relationship before the join/prune messages are sent to the neighbor. Additionally we were calling the pim_upstream_rpf_genid_changed function 2 times in a row. This function just spun throught the upstream list and marked all relevant upstreams to be sent immediately Ticket:CM-11979 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
36d6bd7d34
commit
1148de0adb
@ -350,7 +350,8 @@ int pim_hello_recv(struct interface *ifp,
|
|||||||
hello_option_override_interval,
|
hello_option_override_interval,
|
||||||
hello_option_dr_priority,
|
hello_option_dr_priority,
|
||||||
hello_option_generation_id,
|
hello_option_generation_id,
|
||||||
hello_option_addr_list);
|
hello_option_addr_list,
|
||||||
|
PIM_NEIGHBOR_SEND_DELAY);
|
||||||
if (!neigh) {
|
if (!neigh) {
|
||||||
if (PIM_DEBUG_PIM_HELLO) {
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
char src_str[100];
|
char src_str[100];
|
||||||
@ -374,11 +375,6 @@ int pim_hello_recv(struct interface *ifp,
|
|||||||
/* GenID mismatch ? */
|
/* GenID mismatch ? */
|
||||||
if (!PIM_OPTION_IS_SET(neigh->hello_options, PIM_OPTION_MASK_GENERATION_ID) ||
|
if (!PIM_OPTION_IS_SET(neigh->hello_options, PIM_OPTION_MASK_GENERATION_ID) ||
|
||||||
(hello_option_generation_id != neigh->generation_id)) {
|
(hello_option_generation_id != neigh->generation_id)) {
|
||||||
|
|
||||||
/* GenID changed */
|
|
||||||
|
|
||||||
pim_upstream_rpf_genid_changed(neigh->source_addr);
|
|
||||||
|
|
||||||
/* GenID mismatch, then replace neighbor */
|
/* GenID mismatch, then replace neighbor */
|
||||||
|
|
||||||
if (PIM_DEBUG_PIM_HELLO) {
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
@ -401,7 +397,8 @@ int pim_hello_recv(struct interface *ifp,
|
|||||||
hello_option_override_interval,
|
hello_option_override_interval,
|
||||||
hello_option_dr_priority,
|
hello_option_dr_priority,
|
||||||
hello_option_generation_id,
|
hello_option_generation_id,
|
||||||
hello_option_addr_list);
|
hello_option_addr_list,
|
||||||
|
PIM_NEIGHBOR_SEND_NOW);
|
||||||
if (!neigh) {
|
if (!neigh) {
|
||||||
if (PIM_DEBUG_PIM_HELLO) {
|
if (PIM_DEBUG_PIM_HELLO) {
|
||||||
char src_str[100];
|
char src_str[100];
|
||||||
|
@ -411,7 +411,8 @@ struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
|
|||||||
uint16_t override_interval,
|
uint16_t override_interval,
|
||||||
uint32_t dr_priority,
|
uint32_t dr_priority,
|
||||||
uint32_t generation_id,
|
uint32_t generation_id,
|
||||||
struct list *addr_list)
|
struct list *addr_list,
|
||||||
|
int send_hello_now)
|
||||||
{
|
{
|
||||||
struct pim_interface *pim_ifp;
|
struct pim_interface *pim_ifp;
|
||||||
struct pim_neighbor *neigh;
|
struct pim_neighbor *neigh;
|
||||||
@ -450,8 +451,16 @@ struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
|
|||||||
message with a new GenID is received from an existing neighbor, a
|
message with a new GenID is received from an existing neighbor, a
|
||||||
new Hello message should be sent on this interface after a
|
new Hello message should be sent on this interface after a
|
||||||
randomized delay between 0 and Triggered_Hello_Delay.
|
randomized delay between 0 and Triggered_Hello_Delay.
|
||||||
|
|
||||||
|
This is a bit silly to do it that way. If I get a new
|
||||||
|
genid we need to send the hello *now* because we've
|
||||||
|
lined up a bunch of join/prune messages to go out the
|
||||||
|
interface.
|
||||||
*/
|
*/
|
||||||
pim_hello_restart_triggered(neigh->interface);
|
if (send_hello_now)
|
||||||
|
pim_hello_restart_now (ifp);
|
||||||
|
else
|
||||||
|
pim_hello_restart_triggered(neigh->interface);
|
||||||
|
|
||||||
return neigh;
|
return neigh;
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,10 @@ void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime);
|
|||||||
void pim_neighbor_free(struct pim_neighbor *neigh);
|
void pim_neighbor_free(struct pim_neighbor *neigh);
|
||||||
struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
|
struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
|
||||||
struct in_addr source_addr);
|
struct in_addr source_addr);
|
||||||
|
|
||||||
|
|
||||||
|
#define PIM_NEIGHBOR_SEND_DELAY 0
|
||||||
|
#define PIM_NEIGHBOR_SEND_NOW 1
|
||||||
struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
|
struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
|
||||||
struct in_addr source_addr,
|
struct in_addr source_addr,
|
||||||
pim_hello_options hello_options,
|
pim_hello_options hello_options,
|
||||||
@ -55,7 +59,8 @@ struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
|
|||||||
uint16_t override_interval,
|
uint16_t override_interval,
|
||||||
uint32_t dr_priority,
|
uint32_t dr_priority,
|
||||||
uint32_t generation_id,
|
uint32_t generation_id,
|
||||||
struct list *addr_list);
|
struct list *addr_list,
|
||||||
|
int send_hello_now);
|
||||||
void pim_neighbor_delete(struct interface *ifp,
|
void pim_neighbor_delete(struct interface *ifp,
|
||||||
struct pim_neighbor *neigh,
|
struct pim_neighbor *neigh,
|
||||||
const char *delete_message);
|
const char *delete_message);
|
||||||
|
Loading…
Reference in New Issue
Block a user