Hi
I found a bug in igmpproxy. I used two downlink interfaces. I started receiving a stream on the first interface (vlc), which worked fine. I started the same stream on the second downlink interface, which also worked fine. However, when I stopped the first vlc client, the second client was also interrupted.
I checked the source code and discovered that when vlc exits, igmpproxy tries to discover any remaining clients on the interface vlc was on. When no responses are received, the group is also left on the uplink interface. The client on the second downlink interface is simply forgotten.
I created a patch that solves the problem for me. I suggest carefully reviewing the patch, possibly remove/change/add any comments and logging statements and then apply it. Also, this is not the only way how that problem can be solved.
You can also pull from my repository on github: https://github.com/eriktews/igmpproxy/commit/f0b483a2a02574c1e0ffde68b227c8c8bd689a7e
Here is the description of the patch:
This patch has two effects. First, the quickleave feature/behaviour is disabled for all groups that are used on more than one interface. The idea of quickleave is to leave a group fast and later figure out whether there is still somebody interested in that group. For groups used on more than one interface, it is already known that there is still somebody interested in that group.
Second, when a leave is received for a group that is used on more than one interface, igmpproxy sends queries on all interface to discover remeining listeners for that group. Previously these queries were only send on the interface the leave was received on, so that listeners on the other interfaces were not discovered and the group might be left on the upstream router incorrectly.
This patch can be improved by sending the queries only on the interface the leave was received on and adapting the algorithm in internAgeRoute(...) in rttable.c in a way that only one interface is actually processed and all other interfaces of the route are silently assumed to be still active.