troglobit / pimd

PIM-SM/SSM multicast routing for UNIX and Linux
http://troglobit.com/projects/pimd/
BSD 3-Clause "New" or "Revised" License
194 stars 86 forks source link

fix: on rp election, some variables are not reset #233

Closed stormshield-sylvainm closed 1 year ago

stormshield-sylvainm commented 1 year ago

In some cases, the RP selection mechanism does not work as intended.

For example: with this list of RP:

===============================================================================
Group Address     RP Address       Prio  Holdtime  Type
===============================================================================
232/8             169.254.0.1         1   Forever  Static 
224.1.1           172.16.20.2         0        21  Dynamic
                  172.16.30.3        30       146  Dynamic
                  172.16.10.1        30       146  Dynamic
225.1.1.3/32      172.16.30.3        30       146  Dynamic
                  172.16.10.1        30       146  Dynamic

in the MRT, the RP elected is 172.16.30.3 instead of 172.16.20.2

_______________________________________________________________________________
Multicast Routing Table
===============================================================================
Source            Group            RP Address       Flags 
===============================================================================
192.168.121.11    224.1.1.1        172.16.30.3      CACHE SG
ANY               224.1.1.2        172.16.30.3      WC RP
192.168.121.11    225.1.1.3        172.16.30.3      CACHE SG
troglobit commented 1 year ago

Nice catch, thank you for taking the time to submit this, and sorry for taking so long to merge!