Modify

Opened 5 years ago

Closed 5 years ago

#9643 closed defect (fixed)

6in4 tunnel fails to start at boot

Reported by: heath@… Owned by: developers
Priority: normal Milestone: Backfire 10.03.1
Component: base system Version: Trunk
Keywords: Cc:

Description

A 6in4 tunnel fails to start at boot because the appropriate kernel modules have not yet been loaded when the interface is started.

I can start the tunnel manually later and then it will work.

Excerpt from syslog:

Mar 26 21:44:05 router user.notice rdate: No usable time server for wan found
Mar 26 21:44:06 router user.notice 6in4-update: Re-establishing tunnel due to change on wan (eth0)
Mar 26 21:44:07 router user.info sysinit: ioctl: No such device
Mar 26 21:44:07 router user.info sysinit: Cannot find device "6in4-henet"
Mar 26 21:44:07 router user.info sysinit: Cannot find device "6in4-henet"
Mar 26 21:44:07 router user.info sysinit: Cannot find device "6in4-henet"
Mar 26 21:44:07 router user.info sysinit: Cannot find device "6in4-henet"
Mar 26 21:44:08 router user.notice rdate: No usable time server for henet found
Mar 26 21:44:09 router user.info kernel: PPP generic driver version 2.4.2
Mar 26 21:44:09 router user.info kernel: IPv6 over IPv4 tunneling driver
Mar 26 21:44:09 router user.info kernel: sit0: Disabled Privacy Extensions
Mar 26 21:44:09 router user.info kernel: ip_tables: (C) 2000-2006 Netfilter Core Team
Mar 26 21:44:09 router user.info kernel: NET: Registered protocol family 24
Mar 26 21:44:09 router user.info kernel: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Mar 26 21:44:09 router user.info kernel: ar71xx-ehci ar71xx-ehci: Atheros AR71xx built-in EHCI controller
Mar 26 21:44:09 router user.info kernel: ar71xx-ehci ar71xx-ehci: new USB bus registered, assigned bus number 1
Mar 26 21:44:09 router user.info kernel: ar71xx-ehci ar71xx-ehci: irq 3, io mem 0x1b000000
Mar 26 21:44:09 router user.info kernel: ar71xx-ehci ar71xx-ehci: USB 2.0 started, EHCI 1.00

Notice how the kernel message from the 6in4 driver appears after the attempt to start the tunnel interface.

Attachments (0)

Change History (5)

comment:1 Changed 5 years ago by jow

I wonder why its not brought up by coldplug later on.
Whats the output of "uci -P/var/state show network.henet" right after boot?

comment:2 Changed 5 years ago by heath@…

root@router:~# uci -P/var/state show network.henet
network.henet=interface
network.henet.proto=6in4
network.henet.peeraddr=209.51.181.2
network.henet.ip6addr=2001:470:1f10:166::2/64
network.henet.ipaddr=66.43.210.29
network.henet.ifname=6in4-henet
network.henet.device=6in4-henet
network.henet.auto=0
network.henet.defaultroute=1
network.henet.up=1
network.henet.connect_time=20

It appears to say it's up, but when I run ifconfig there's no tunnel interface. I can then run 'ifup henet' manually and the tunnel interface will appear in ifconfig.

comment:3 Changed 5 years ago by jow

Thats what I wanted to know. Because it is wrongly flagged as "up" by the failed attempt, the coldplug later on will not try to bring it up again.

Please test the patch below.

--- package/6in4/files/6in4.hotplug	(revision 27375)
+++ package/6in4/files/6in4.hotplug	(working copy)
@@ -20,6 +20,11 @@
 		local wanip=$(find_6in4_wanip "$wandev")
 
 		[ -n "$wanip" ] && {
+			lsmod | grep -q ^sit || {
+				logger -t 6in4-update "Tunneling driver not loaded yet, deferring action"
+				exit 0
+			}
+
 			local tunnelid
 			config_get tunnelid "$cfg" tunnelid
 

comment:4 Changed 5 years ago by heath@…

That patch does indeed fix the problem for me. I see the logger message, then the kernel message from the tunnel driver, then a bit later the tunnel comes up.

comment:5 Changed 5 years ago by jow

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

Thank you for testing, I committed the change in r27449 and r27450.

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.