* Is there any necessary to add multicast route for a loopback device?
@ 2011-11-30 7:38 Li Wei
2011-12-01 2:30 ` Li Wei
0 siblings, 1 reply; 6+ messages in thread
From: Li Wei @ 2011-11-30 7:38 UTC (permalink / raw)
To: netdev
Hi all,
I found that since Fedora 15, it use systemd as the 'init'. When systemd start
it would config the ipv6 address(::1/128) for 'lo' and start it. While adding
this address to 'lo', kernel will call addrconf_add_mroute() to set a multicast
route for 'lo' with rt->dst.error = -ENETUNREACH. After that, when I send multi-
cast message, the route subsystem return a route with .error set to NETUNREACH.
Is there any necessary to add multicast route for a loopback device?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any necessary to add multicast route for a loopback device?
2011-11-30 7:38 Is there any necessary to add multicast route for a loopback device? Li Wei
@ 2011-12-01 2:30 ` Li Wei
2011-12-01 3:35 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Li Wei @ 2011-12-01 2:30 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Hi David,
what's your opinion?
> Hi all,
>
> I found that since Fedora 15, it use systemd as the 'init'. When systemd start
> it would config the ipv6 address(::1/128) for 'lo' and start it. While adding
> this address to 'lo', kernel will call addrconf_add_mroute() to set a multicast
> route for 'lo' with rt->dst.error = -ENETUNREACH. After that, when I send multi-
> cast message, the route subsystem return a route with .error set to NETUNREACH.
>
> Is there any necessary to add multicast route for a loopback device?
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any necessary to add multicast route for a loopback device?
2011-12-01 2:30 ` Li Wei
@ 2011-12-01 3:35 ` David Miller
2011-12-01 4:31 ` Li Wei
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2011-12-01 3:35 UTC (permalink / raw)
To: lw; +Cc: netdev
From: Li Wei <lw@cn.fujitsu.com>
Date: Thu, 01 Dec 2011 10:30:00 +0800
> what's your opinion?
I have many higher priority tasks than this issue, so it is a poor
idea to try and force me to look into this.
If no other developer cares to answer, maybe it isn't all that
important.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any necessary to add multicast route for a loopback device?
2011-12-01 3:35 ` David Miller
@ 2011-12-01 4:31 ` Li Wei
2011-12-01 4:36 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: Li Wei @ 2011-12-01 4:31 UTC (permalink / raw)
To: David Miller; +Cc: netdev
> From: Li Wei <lw@cn.fujitsu.com>
> Date: Thu, 01 Dec 2011 10:30:00 +0800
>
>> what's your opinion?
>
> I have many higher priority tasks than this issue, so it is a poor
> idea to try and force me to look into this.
>
> If no other developer cares to answer, maybe it isn't all that
> important.
>
>
My apologize :(
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any necessary to add multicast route for a loopback device?
2011-12-01 4:31 ` Li Wei
@ 2011-12-01 4:36 ` Eric Dumazet
2011-12-01 6:01 ` Li Wei
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2011-12-01 4:36 UTC (permalink / raw)
To: Li Wei; +Cc: David Miller, netdev
Le jeudi 01 décembre 2011 à 12:31 +0800, Li Wei a écrit :
> > From: Li Wei <lw@cn.fujitsu.com>
> > Date: Thu, 01 Dec 2011 10:30:00 +0800
> >
> >> what's your opinion?
> >
> > I have many higher priority tasks than this issue, so it is a poor
> > idea to try and force me to look into this.
> >
> > If no other developer cares to answer, maybe it isn't all that
> > important.
> >
> >
>
> My apologize :(
It would help us if you provide a test program an setup script, because
we have litle time to figure out what exact problem you hit.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any necessary to add multicast route for a loopback device?
2011-12-01 4:36 ` Eric Dumazet
@ 2011-12-01 6:01 ` Li Wei
0 siblings, 0 replies; 6+ messages in thread
From: Li Wei @ 2011-12-01 6:01 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
Eric Dumazet wrote:
> Le jeudi 01 décembre 2011 à 12:31 +0800, Li Wei a écrit :
>>> From: Li Wei <lw@cn.fujitsu.com>
>>> Date: Thu, 01 Dec 2011 10:30:00 +0800
>>>
>>>> what's your opinion?
>>> I have many higher priority tasks than this issue, so it is a poor
>>> idea to try and force me to look into this.
>>>
>>> If no other developer cares to answer, maybe it isn't all that
>>> important.
>>>
>>>
>> My apologize :(
>
> It would help us if you provide a test program an setup script, because
> we have litle time to figure out what exact problem you hit.
>
>
>
>
>
Thanks Eric!
The following is the test code:
================================= cut ====================================
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#define MADDR "ff00::00"
int main(int argc, char **argv) {
struct ipv6_mreq mreq;
struct in6_addr addr;
unsigned int mcast_if;
int sk;
if((sk = socket(AF_INET6, SOCK_DGRAM, 0)) == -1) {
printf("socket\n");
exit(1);
}
inet_pton(AF_INET6, MADDR, &addr);
mreq.ipv6mr_multiaddr = addr;
printf("== join a multicast group with the interface index is specified as 0 ==\n");
mreq.ipv6mr_interface = 0;
if (setsockopt(sk, IPPROTO_IPV6, IPV6_JOIN_GROUP,
(char *) &mreq, sizeof(mreq)) == -1) {
perror("setsockopt IPV6_JOIN_GROUP");
exit(1);
}
close(sk);
printf("OK\n");
return 0;
}
================================= cut ====================================
My aim is to join a multicast group without the interface index specified, as the RFC 3493
(5.2 Sending and Receiving Multicast Packets) said "If the interface index is specified as 0,
the kernel chooses the local interface.".
When this test run on Fedora 15(ipv6 enabled), it failed and return error ENODEV.
This problem can be reproduced by the following steps:
1. enable ipv6 if you haven't
# modprobe ipv6
2. make all network interfaces down
# ip link set lo down; ip link set eth0 down; ...
3. set a ipv6 address for lo
# ip addr add ::1/128 dev lo
4. make all interfaces up
# ip link set lo up; ip link set eth0 up; ...
run test and it will return ENODEV
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-01 6:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-30 7:38 Is there any necessary to add multicast route for a loopback device? Li Wei
2011-12-01 2:30 ` Li Wei
2011-12-01 3:35 ` David Miller
2011-12-01 4:31 ` Li Wei
2011-12-01 4:36 ` Eric Dumazet
2011-12-01 6:01 ` Li Wei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).