I'm trying to modify mrouted to proxy IGMP joins from one interface to
another on GNU/Linux 2.4.31. The setup is roughly as follows (with
fictional and isolated networks):
hostA
|
eth1(1.1.1.1)
|
---(1.1/16)
|
eth1(1.1.1.2)
|
mrouter
|
eth0(1.2.1.1)
|
---(1.2/16)
|
eth0 (1.2.1.2)
|
hostB
The mrouted on "mrouter" is modified such that when a join from hostA
is received on eth1 ("RECV V2 member report" in tcpdump terms) it does
a mrouted/k_join() to setsockopt IP_ADD_MEMBERSHIP on the multicast
socket, with the source address set to 1.2.1.1 (i.e. mrouter's eth0).
This indeed causes mc joins to appear on eth0 of mrouter, but their
source address is set to 1.1.1.2 rather than 1.2.1.1 - i.e. they
appear to "come" from mrouter's eth1 rather than eth0.
Strangely, when the joins are sent from hostB then they also get the
source address of 1.1.1.2 when they are forwarded to hostA. It seems
that a "default" source address is being used, no matter was is
specified in the IP_ADD_MEMBERSHIP.
I've checked the kernel sources at
http://lxr.linux.no/source and I
don't see any obvious reason why the source address of my
IP_ADD_MEMBERSHIP should not be respected. Am I missing some trick
here? Is this a known problem/feature? Any workaround.
All/any advice welcomed. Thanks.