diff options
| author | Nathan Bahr <nbahr@atcorp.com> | 2024-10-30 21:21:50 +0000 | 
|---|---|---|
| committer | Nathan Bahr <nbahr@atcorp.com> | 2025-01-09 21:58:22 +0000 | 
| commit | e8d81ab5ce04237ddc28ac0dc4b29e49dd2a1979 (patch) | |
| tree | 376ea42105e3924333bb7005ca6dcb8fd3cf309e /pimd/pim_mroute.c | |
| parent | 8b00575fbb358bc214a9281c948cb0d703aa7605 (diff) | |
pimd: Implement rpf lookup mode as a list
Add the support to store lookup modes as a sorted list.
List is non-unique and sorts mode with both lists < modes with one list < global mode (no lists).
This way, when finding the right mode, we will match a lookup using a prefix list before the global mode.
Add passing group address into all lookups (using nht cache and/or synchronous lookup).
Many areas don't have a group address, use PIMADDR_ANY if no valid group is needed.
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
Diffstat (limited to 'pimd/pim_mroute.c')
| -rw-r--r-- | pimd/pim_mroute.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 93bdd8dac9..6c13e1324f 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -567,7 +567,8 @@ int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf,  			 * setting the SPTBIT to true  			 */  			if (!(pim_addr_is_any(up->upstream_register)) && -			    pim_nht_lookup(pim_ifp->pim, &source, up->upstream_register, 0)) { +			    pim_nht_lookup(pim_ifp->pim, &source, up->upstream_register, up->sg.grp, +					   false)) {  				pim_register_stop_send(source.interface, &sg,  						       pim_ifp->primary_address,  						       up->upstream_register); @@ -580,7 +581,8 @@ int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf,  							__func__);  		} else {  			if (I_am_RP(pim_ifp->pim, up->sg.grp)) { -				if (pim_nht_lookup(pim_ifp->pim, &source, up->upstream_register, 0)) +				if (pim_nht_lookup(pim_ifp->pim, &source, up->upstream_register, +						   up->sg.grp, false))  					pim_register_stop_send(  						source.interface, &sg,  						pim_ifp->primary_address,  | 
