Is there any necessary to add multicast route for a loopback device?
Subsystems (2)
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?
Hi David,
what's your opinion?
Quoted 16 lines
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' withrt->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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller
maintainerFrom: Li Wei <[email protected]>
Date: Thu, 01 Dec 2011 10:30:00 +0800
Quoted 1 line
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.
Quoted 12 lines
From: Li Wei <[email protected]>
Date: Thu, 01 Dec 2011 10:30:00 +0800Quoted 1 line
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 :(
Quoted 8 lines · Li Wei
Quoted 8 lines
From: Li Wei <[email protected]>
Date: Thu, 01 Dec 2011 10:30:00 +0800Quoted 1 line
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.
Quoted 6 lines
Quoted 4 lines
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.
Quoted 8 lines · Eric Dumazet
Quoted 7 lines · Li Wei
Quoted 7 lines
From: Li Wei <[email protected]>
Date: Thu, 01 Dec 2011 10:30:00 +0800Quoted 1 line
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.
Quoted 13 lines
Quoted 5 lines
Quoted 4 lines
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