Tnx for the sugestion! I will dig into it during the weekent!
-----Original Message-----
From: 44net-bounces+marius=yo2loj.ro(a)hamradio.ucsd.edu
[mailto:44net-bounces+marius=yo2loj.ro@hamradio.ucsd.edu] On Behalf Of Rob
Janssen
Sent: Tuesday, October 08, 2013 22:43
To: 44net(a)hamradio.ucsd.edu
Subject: Re: [44net] 44Net Digest, Vol 2, Issue 162
(Please trim inclusions from previous messages)
_______________________________________________
Rob Janssen wrote:
> Subject:
> Re: [44net] 44Net Digest, Vol 2, Issue 159
> From:
> sp2lob <sp2lob(a)tlen.pl>
> Date:
> 10/07/2013 09:49 PM
>
> To:
> AMPRNet working group <44net(a)hamradio.ucsd.edu>
>
>
> Hello Rob et al,
>
> Quote:
> "...by default mcast routes will be associated with an interface
> the kernel picks (usually the first to come up)."
>
> There is something what you're looking for, I believe.
> Small, nifty & powerfull program to install: *smcroute*
>
> The *smcroute* <http://www.cschill.de/smcroute/> utility provides a
> command line interface to manipulate the multicast routing tables via a
method
other than *mrouted*.
Tom,
I looked in the source and this tool is not going to fix it.
It uses exactly the same setsockopt call that ampr-ripd is already
using to join the multicast group.
The problem is that this setsockopt has 2 IP address parameters, one
is the address of the local interface and the other is the multicast group
to
join.
This is of course wrong. The first should not be an
IP address but an
interface name.
But this kernel interface appears to be very old,
dating back from BSD
Unix.
Checking the kernel sources I found that besides the IP_ADD_MEMBERSHIP call
to setsockopt, another option exists: MCAST_JOIN_GROUP which receives a
group_req struct (instead of ip_mreq) which includes a gr_interface member,
an interface index which can be filled using if_nametoindex(ifname).
So, if the call is changed in ampr-ripd, it can uniquely add the multicast
address to the correct interface (which is already known in ampr-ripd).
Marius ? What about changing this?
Rob