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

rp group longest match #123

Closed soar0603 closed 6 years ago

soar0603 commented 6 years ago

hi: I find rp_grp_match() not perform longest match on group-range, i seems match network only;

RFC4601: 4.7.1. Group-to-RP Mapping: The algorithm for performing the group-to-RP mapping is as follows:

  1. Perform longest match on group-range to obtain a list of RPs.
  2. From this list of matching RPs, find the one with highest priority. Eliminate any RPs from the list that have lower priorities.
  3. If only one RP remains in the list, use that RP.
  4. If multiple RPs are in the list, use the PIM hash function to choose one.
troglobit commented 6 years ago

From a quick glance this looks OK. Thanks for submitting this! :-)

However, the pull request has conflicts and cannot be merged as is. Because it is based on year old fork. It also does not follow the coding style of the project. I could have merged this and fixed the coding style myself, but since there's a conflict I cannot even merge this cleanly.

I'd very much appreciate if you could update your fork and resubmit the PR.