Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7734 closed defect (fixed)

wrt160nl r22553 radvd does not start on wlan0

Reported by: redfuse Owned by: jow
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: radvd Cc:

Description

Hello,
the radvd does not start on wlan0 interface of my wrt160nl (r22553).

root@OpenWrt:/etc/config# /etc/init.d/radvd start
[Jan 01 00:40:15] radvd: interface wlan0 is not RUNNING
[Jan 01 00:40:15] radvd: interface wlan0 does not exist
[Jan 01 00:40:15] radvd: error parsing or activating the config file: /var/etc/radvd.conf.

The interface wlan0 is working well both on IPv4 and IPv6 (static addressing) and IP connectivity is ok.

root@OpenWrt:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:23:69:ED:9C:13
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fd04:bd3:80e8:1::1/64 Scope:Global
          inet6 addr: fe80::223:69ff:feed:9c13/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:123 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15227 (14.8 KiB)  TX bytes:22075 (21.5 KiB)

root@OpenWrt:/etc/config# cat /var/etc/radvd.conf
interface eth0
{
        AdvSendAdvert on;
        AdvManagedFlag off;
        AdvOtherConfigFlag off;

        prefix fd04:bd3:80e8:ff::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};

interface wlan0
{
        AdvSendAdvert on;
        AdvManagedFlag off;
        AdvOtherConfigFlag off;

        prefix fd04:bd3:80e8:1::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};

root@OpenWrt:/etc/config# cat network

config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

config 'interface' 'lan'
        option 'ifname' 'eth0'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'
        option ip6addr fd04:0bd3:80e8:ff::1/64
#       option ip6gw fd04:0bd3:80e8:ff::2

config 'interface' 'wan'
        option 'ifname' 'eth1'
        option 'proto' 'dhcp'
#       option 'proto' 'static'
#       option 'ipaddr' '192.168.3.1'
#       option 'netmask' '255.255.255.0'

config 'interface' 'wifi'
        option 'ifname' 'wlan0'
        option 'proto' 'static'
        option 'ipaddr' '192.168.2.1'
        option 'netmask' '255.255.255.0'
        option ip6addr fd04:0bd3:80e8:1::1/64
#       option ip6gw fd04:0bd3:80e8:1::2
root@OpenWrt:/etc/config#

root@OpenWrt:/etc/config# cat radvd
config interface
        option interface        'lan'
        option AdvSendAdvert    1
        option AdvManagedFlag   0
        option AdvOtherConfigFlag 0
        option ignore           0

config prefix
        option interface        'lan'
        # If not specified, a non-link-local prefix of the interface is used
        option prefix           'fd04:bd3:80e8:ff::/64'
        option AdvOnLink        1
        option AdvAutonomous    1
        option AdvRouterAddr    1
        option ignore           0

config rdnss
        option interface        'lan'
        # If not specified, the link-local address of the interface is used
        option addr             ''
        option ignore           1

config interface
        option interface        'wifi'
        option AdvSendAdvert    1
        option AdvManagedFlag   0
        option AdvOtherConfigFlag 0
        option ignore           0

config prefix
        option interface        'wifi'
        # If not specified, a non-link-local prefix of the interface is used
        option prefix           'fd04:bd3:80e8:1::/64'
        option AdvOnLink        1
        option AdvAutonomous    1
        option AdvRouterAddr    1
        option ignore           0

        config rdnss
        option interface        'wifi'
        # If not specified, the link-local address of the interface is used
        option addr             ''
        option ignore           1
root@OpenWrt:/etc/config#


Attachments (0)

Change History (9)

comment:1 Changed 6 years ago by jow

  • Owner changed from developers to jow
  • Status changed from new to assigned

This is a race condition. Wifi interfaces in particular are brought up way later than ethernet ports, therefore no iface is available during init.

The radvd boot startup must be moved to hotplug most likely.

comment:2 Changed 6 years ago by davidbb@…

I'm having this same issue on 10.03.1-rc1 (r22556) but on a brcm47xx with a 2.6 kernel. i think the problem is that the interface does not set the RUNNING flag so it may be a kernel or b43 issue in my case. in redfuse's output above, ifconfig wlan0 does not show RUNNING either.

The radvd code that looks for the iff_running flag is here:
http://cvs.litech.org/viewcvs/radvd/device-common.c?rev=1.10&view=markup

comment:3 Changed 6 years ago by aenertia@…

Also seeing this on my wnd1043 running trunk snapshot from the 27/08/2010

root@paturima:/etc/config# /etc/init.d/radvd start
[Aug 28 23:49:30] radvd: interface wlan0 is not RUNNING
[Aug 28 23:49:30] radvd: interface wlan0 does not exist
[Aug 28 23:49:30] radvd: error parsing or activating the config file: /var/etc/radvd.conf

comment:4 Changed 6 years ago by anonymous

can be worked around by adding the wlan0 to a new bridged device

comment:5 Changed 6 years ago by anonymous

I see the exact same issue on a TP-Link TL-WR1043ND (v1.7). It cannot related to booting at all. I am trying to start radvd manually with the generated config file (/var/etc/radvd.conf) a long time after booting, and the same happens. Checking ifconfig shows that the RUNNING flag is not activated. If I modify the config to use eth0.1 instead, it starts up immediately.

I believe the missing RUNNING flag is the key factor. I can use the wlan0 device, it have wireless clients connected. But radvd declines to start due to this.

comment:6 Changed 6 years ago by anonymous

Just tried to the bridge approach (adding 'option type bridge' to /etc/config/network for the wlan0 device). The bridge got setup properly. radvd did start now without any complaints (the br-wlan0 device is in RUNNING state), but I see the following error messages with logread:

Oct 24 00:40:39 router daemon.warn radvd[1548]: sendmsg: Operation not permitted

And they come regularly. Doing an strace on the radvd process gives this:

sendmsg(4, {msg_name(28)={sa_family=AF_INET6, sin6_port=htons(58), inet_pton(AF_INET6, "ff02::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=if_nametoindex("eth0.1")}, msg_iov(1)=[{"\206\0\0\0@\0\1,\0\0\0\0\0\0\0\0\3\4@\340\0\1Q\200\0\0008@\0\0\0\0"..., 56}], msg_controllen=32, {cmsg_len=32, cmsg_level=SOL_IPV6, cmsg_type=, ...}, msg_flags=0}, 0) = 56
gettimeofday({1287873944, 929727}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [ALRM], [ALRM], 16) = 0
gettimeofday({1287873944, 930143}, NULL) = 0
rt_sigaction(SIGALRM, {0x10000000, [], SA_SIGINFO|0x403eb4}, {0x10000000, [], SA_SIGINFO|0x403eb4}, 16) = 0
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={5, 413310}}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [ALRM], NULL, 16) = 0
gettimeofday({1287873944, 931413}, NULL) = 0
rt_sigaction(SIGALRM, {0x10000000, [], SA_SIGINFO|0x403eb4}, {0x10000000, [], SA_SIGINFO|0x403eb4}, 16) = 0
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={5, 412040}}, NULL) = 0
sigreturn()                             = ? (mask now [EMT KILL SEGV PIPE ALRM TERM USR2 PWR URG IO TSTP TTIN VTALRM XCPU])
_newselect(5, [4], NULL, NULL, NULL)    = 1 (in [4])
recvmsg(4, {msg_name(28)={sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "fe80::da5d:4cff:febb:171a", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=if_nametoindex("eth0.1")}, msg_iov(1)=[{"\206\0-\211@\0\1,\0\0\0\0\0\0\0\0\3\4@\340\0\1Q\200\0\0008@\0\0\0\0"..., 1500}], msg_controllen=48, {cmsg_len=32, cmsg_level=SOL_IPV6, cmsg_type=, ...}, msg_flags=0}, 0) = 56
_newselect(5, [4], NULL, NULL, NULL)    = ? ERESTARTNOHAND (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
gettimeofday({1287873950, 345135}, NULL) = 0
ioctl(4, 0x8913, {ifr_name="br-wifinet", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_MULTICAST}) = 0
open("/proc/net/igmp6", O_RDONLY)       = 5
ioctl(5, TIOCNXCL, 0x7feb0068)          = -1 ENOTTY (Inappropriate ioctl for device)

comment:7 Changed 6 years ago by dazo@…

Just noticed this ...

root@router:~# ip link show wlan0
18: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DORMANT qlen 1000
    link/ether d8:5d:4c:bb:17:1a brd ff:ff:ff:ff:ff:ff
root@router:~# 

Checking up against kernel docs (Documentation/netwirking/operstates.txt

IF_OPER_DORMANT (5):
 Interface is L1 up, but waiting for an external event, f.e. for a
 protocol to establish. (802.1X)
__LINK_STATE_DORMANT, maps to IFF_DORMANT:

Set by the driver to express that the device cannot yet be used
because some driver controlled protocol establishment has to
complete. Corresponding functions are netif_dormant_on() to set the
flag, netif_dormant_off() to clear it and netif_dormant() to query.

On device allocation, networking core sets the flags equivalent to
netif_carrier_ok() and !netif_dormant().

I'm just wondering if this is something hostapd forgets to do.

comment:8 Changed 6 years ago by nbd

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in r23641, r23642

comment:9 Changed 6 years ago by dazo@…

I can confirm that this patch fixes the issue. After compiling the updated hostapd from SVN r23644, the wlan0 device is in UP/RUNNING state and radvd do not have any issues starting up and doing its job properly.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.