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

on freebsd, in k_req_incoming, if source is local, the return value must be TRUE #232

Closed stormshield-sylvainm closed 1 year ago

stormshield-sylvainm commented 1 year ago

Problem : the election of the BSR is unstable, if the BSR is on a direct route.

Solution : fix the regression brought by the commits : The commit c8d06b0a3b277cdc8b488845973f4a33c58f112d modified find_vif_direct_local() to take into account addresses that are not part of the interfaces/masks but that are known by the kernel as direct. see https://github.com/troglobit/pimd/pull/153 The commit 4a6b1a94735b7c25de42d72d08ba7f33f7516662 fixed a blocking of pimd by a recusive call of k_req_incoming by removing the call to find_vif_direct_local(), which caused the regression.

The solution chosen is to add a parameter to find_vif_direct_local() to indicate whether a call to k_req_incoming is made.

troglobit commented 1 year ago

:clap: Nicely done! :+1:

troglobit commented 1 year ago

For future reference, please put whitespace fixes/changes in a separate commit.

Only thing I'll fix after this is minor parameter rename, otherwise very clean :)