On Mon, Jan 25, 2010 at 6:05 PM, Christiano F. Haesbaert
<haesba...@haesbaert.org> wrote:
> It seems ripd will explicitly add a route to rip's multicast address.
>
> Isn't IP_ADD_MEMBERSHIP to join the group and IP_MULTICAST_IF to
> specify which interface enough ?. Please correct me.

Got me.  I'm not really a networking guy (I had to turn in my card
when I stopped being a LISA-level sysadmin and became a developer),
but it seems like you're close to being able to dig up the answer for
yourself.  I mean, you've identified the code:

> This seems to be the code:
>
> kr_all_rip_routers.prefix.s_addr = inet_addr(ALL_RIP_ROUTERS);
> kr_all_rip_routers.netmask.s_addr = htonl(INADDR_BROADCAST);
> kr_all_rip_routers.nexthop.s_addr = htonl(INADDR_LOOPBACK);
>
> kr_state.fib_sync = 1; /* force addition of multicast route */
> if (send_rtmsg(kr_state.fd, RTM_ADD, &kr_all_rip_routers) != -1)
>        flag_all_rip_routers = 1;

So, have you read the commit message that added that code?  If you're
not sure what version that code appeared in, use "cvs annotate
whatever.c" to see when those lines were committed.  Then compare that
version to the previous version with "cvs diff -r1.N-1 -r1.N
whatever.c" to confirm that rev 1.N actually added those lines (and it
wasn't just a reformatting or similar).  If not, repeat with "cvs
annotate -r1.N-1 whatever.c" until you find when the code was added.
Then use "cvs log -N -r1.N whatever.c" to see the commit message.
Hopefully (tm), the commit message will be clear, or at least point
you in the right direction for understanding why it was added.

Good luck!


Philip Guenther

Reply via email to