diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2025-02-12 12:39:27 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-12 12:39:27 -0500 | 
| commit | 45e7fc0bedd01bbe4b784d37a90ef28ac4569f2f (patch) | |
| tree | a171f2dd2e578abbeffc8c3c1b7ce3c00fc42ddc /pimd | |
| parent | 6d933fcbc31d13e8547086975c5d6671b9399d8d (diff) | |
| parent | b61fedd0291d6dc0d9994a7ace59c104ee43417c (diff) | |
Merge pull request #18056 from FRRouting/mergify/bp/dev/10.3/pr-18048
pimd: fix DR election race on startup (backport #18048)
Diffstat (limited to 'pimd')
| -rw-r--r-- | pimd/pim_nb_config.c | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c index 6af9291997..5203f78b92 100644 --- a/pimd/pim_nb_config.c +++ b/pimd/pim_nb_config.c @@ -2043,6 +2043,11 @@ int lib_interface_pim_address_family_pim_enable_modify(struct nb_cb_modify_args  					 ifp->name);  				return NB_ERR_INCONSISTENCY;  			} + +			/* Trigger election in case it was never run before */ +			pim_ifp = ifp->info; +			if (pim_addr_is_any(pim_ifp->pim_dr_addr)) +				pim_if_dr_election(ifp);  		} else {  			pim_ifp = ifp->info;  			if (!pim_ifp) @@ -2076,6 +2081,10 @@ int lib_interface_pim_address_family_pim_passive_enable_modify(  		pim_ifp = ifp->info;  		pim_ifp->pim_passive_enable =  			yang_dnode_get_bool(args->dnode, NULL); + +		/* Trigger election in case it was never run before */ +		if (pim_ifp->pim_passive_enable && pim_addr_is_any(pim_ifp->pim_dr_addr)) +			pim_if_dr_election(ifp);  		break;  	}  | 
