troglobit / pimd

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

PIM Assert handling does not seem to work #63

Closed idismmxiv closed 8 years ago

idismmxiv commented 8 years ago

While doing some tests I ended up to a situation where RP had some (S,G) entries in Assert state. Once entered to such state, it looks like pimd never resets Assert. I looked at the receive_pim_assert() function a bit and I couldn't understand what actually happens there. First of all in pim_proto.c line 2878-2879 there is mrt->timer manipulation, but I suppose it should be mrt->assert_timer manipulation? If I change that timer, then ASSERT timer starts to run once assert message is received. But then in timer.c the assert_timer handling seems to be somewhat unfinished.

What I would do is change mrt->timer to mrt->assert_timer in receive_pim_assert(), and then in timer.c ifassert_timerhas expired, then go through all VIFs of givenmrtentry and clear assert state. Currently VIFs are not looped through at all while doing assert checks andasserted_oifs` are not cleared.

So, am I missing something here? I could do some fixes to assert message state handling, but it would be great to get another opinion how this should be fixed.

troglobit commented 8 years ago

Good work tracking this one down! I've actually never dared to venture into the assert handling, it always looked very scary. I too have noticed recurring problems with the assert election but could never figure out what was the root cause ... you may have stumbled upon it here! :+1:

In any case, simply creating a branch and doing a pull-request is a LOT easier to discuss around at GitHub. So just go ahead and make a pull request and we can discuss the details around that :smiley:

troglobit commented 8 years ago

Merged to master