(usagi-users 04035) IPV6_ROUTER_ALERT and mcast-tools
"Ian Brown" <[email protected]> Sun, 6 Apr 2008 17:05:04 +0300
| Newsgroups | gmane.linux.ipv6.usagi.users |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I tried to run the pim6sd daemon from mcast-tools against a kernel
with Multicast Routing support. I followed this thread:
http://www.spinics.net/lists/netdev/msg59211.html
When starting the pim6sd daemon, I saw this error in the kernel log:
pim6sd[2682]: warning - setsockopt(IPV6_ROUTER_ALERT): Invalid argument
And the daemon ***did not*** start.
As far as I understand, there is a problem here.
Because the mld6 socket which we try to open, calls
setsockopt with IPV6_ROUTER_ALERT; on the other hand, this
mld6 socket is an ICMPV6 socket :
See in init_mld6() , mld6.c :
...
mld6_socket = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6))
...
And the linux kernel (also the USAGI Multicast Routing) can get
IPV6_ROUTER_ALERT
for setsockopts **only** on RAW sockets
see ip6_ra_control() in ipv6_sockglue.c:
..
/* RA packet may be delivered ONLY to IPPROTO_RAW socket */
if (sk->sk_type != SOCK_RAW || inet_sk(sk)->num != IPPROTO_RAW) {
return -EINVAL;
}
So , should this code in pim6sd be changed ? (as it seems, this can't work).
Or maybe the kernel code in ip6_ra_control() which checks for RAW sockets ?
I saw, following this warning , another message: "can't forward: only
one enabled vif"
I don't know if it has to do with the "warning -
setsockopt(IPV6_ROUTER_ALERT): Invalid argument" warning.
Any ideas ?
Regards,
IB