Modify

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10181 closed defect (fixed)

Config error in /e/c/wireless (wrong HTmode on ch161) makes LAN dead to the world

Reported by: mystica555 <mystica@…> Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: switch lan dead rtl8366s uci Cc:

Description

WNDR3700v2, RTL8366s switch, error in /etc/config/wireless causes to cause brctl to error and never form br-lan properly, even though br-lan exists and claims to have eth0.1 and wlan0 attached.

Was having a friend try different 5ghz channels for proper 300meg 5ghz HT40 mode on a bevy of MacBooks. At first, he was on ch36,+1 so it was already set to '2nd channel above'

I mention (verbally on skype) "Go to 161 instead, I forgot the power output restrictions on 5.2ghz, and set the mode to channel below. It won't go above 161."

He either did not see the the setting due to being hidden so well or forgot it. Instantaneously he drops off of skype/irc and my ssh session is dead. The moment apply was clicked without modifying the other tab's control channel setting in LuCI.

This was not known to be the root fault of 'lan dead' for a few hours.

I redid the network config from scratch again after instructing how to copy defaults during failsafe mode. I then enabled an external ssh port for the router itself for a way back in should it die again, vs my wan> server >tmux >router_lan chain of before.

After a couple of false starts to isolate the issue, I on a whim decided to re-create the HTMode setting flub...

--- /etc/config/wireless        2011-10-05 02:56:10.000000000 -0400
+++ wifi-new    2011-10-05 08:40:02.119997362 -0400
@@ -29,7 +29,7 @@
        list 'ht_capab' 'RX-STBC1'
        list 'ht_capab' 'DSSS_CCK-40'
        option 'country' 'US'
-       option 'htmode' 'HT40-'
+       option 'htmode' 'HT40+'
        option 'channel' '161'
        option 'txpower' '20'

BAM.

root@DarwinAnimeRouter:/tmp# wifi
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr e0:46:9a:5e:ef:e4 and ssid 'Orly'
Configuration file: /var/run/hostapd-phy1.conf
HT40 channel pair (161, 1) not allowed
Interface initialization failed
rmdir[ctrl_interface]: No such file or directory
brctl: bridge br-lan: Operation not supported
brctl: bridge br-lan: File exists
brctl: bridge br-lan: Operation not supported

The ssh session I am using (via fowarded wan > lan_server > tmux > router) died at this point.
The 2nd ssh session im using (wan > router direct) still working:

Nmap shows, only the router is accessible:

root@DarwinAnimeRouter:/etc/config# nmap -sP 192.168.25.0/24

Starting Nmap 5.51 ( http://nmap.org ) at 2011-10-05 08:47 EDT
Nmap scan report for 192.168.25.1
Host is up.
Nmap done: 256 IP addresses (1 host up) scanned in 10.90 seconds

Before changing the mistake back, I re-twiddled the switch in the same way, to no result. Dead end.

I then change the one byte difference back and re-run wifi

root@DarwinAnimeRouter:/etc/config# vi /etc/config/wireless 
root@DarwinAnimeRouter:/etc/config# wifi
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr e0:46:9a:5e:ef:e4 and ssid 'Orly'
Configuration file: /var/run/hostapd-phy1.conf
Using interface wlan1 with hwaddr e0:46:9a:5e:ef:e6 and ssid 'CharlesDeGaul'
root@DarwinAnimeRouter:/etc/config# nmap -sP 192.168.25.0/24

Starting Nmap 5.51 ( http://nmap.org ) at 2011-10-05 08:57 EDT
Nmap scan report for 192.168.25.1
Host is up.
Nmap scan report for DarwinAnimeServer.lan (192.168.25.100)
Host is up (0.00029s latency).
MAC Address: 00:03:93:46:48:9A (Apple Computer)
Nmap scan report for HDHR-103063BC.lan (192.168.25.109)
Host is up (0.00019s latency).
MAC Address: 00:18:DD:03:06:3B (Silicondust Engineering)
Nmap scan report for MamaMacBook.lan (192.168.25.110)
Host is up (0.0018s latency).
MAC Address: 00:1F:5B:B8:04:43 (Apple)
Nmap scan report for Shiggity-HTPC.lan (192.168.25.129)
Host is up (0.029s latency).
MAC Address: C0:3F:0E:44:8C:68 (Netgear)
Nmap scan report for Shiggitays-MacBook.lan (192.168.25.148)
Host is up (0.00019s latency).
MAC Address: 00:1E:C2:04:A8:28 (Apple)
Nmap done: 256 IP addresses (6 hosts up) scanned in 2.84 seconds

Interestingly enough the bridge doesn't seem to look wrong but it doesn't work after the wifi setting change:

root@DarwinAnimeRouter:/etc/config# brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          8000.e0469a5eefe6       no              eth0.1
                                                        wlan0
                                                        wlan1
root@DarwinAnimeRouter:/etc/config# vi /etc/config/wireless 
root@DarwinAnimeRouter:/etc/config# wifi
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr e0:46:9a:5e:ef:e4 and ssid 'Orly'
Configuration file: /var/run/hostapd-phy1.conf
HT40 channel pair (161, 1) not allowed
Interface initialization failed
rmdir[ctrl_interface]: No such file or directory
brctl: bridge br-lan: Operation not supported
brctl: bridge br-lan: File exists
brctl: bridge br-lan: Operation not supported
root@DarwinAnimeRouter:/etc/config# brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          8000.e0469a5eefe6       no              eth0.1
                                                        wlan0
root@DarwinAnimeRouter:/etc/config# nmap -sP 192.168.25.0/24

Yet even with eth0.1 present, ONLY wlan0 is talking as LAN. It will route wlan0 > wan just fine.

Im 90% sure that wlan0 was working as LAN with the wlan1 config error, but all devices connected at present when filling this report were on 5ghz or wired in.


A few thoughts:

On the backend (as I presume LuCI calls the same 'wifi' and '/etc/init.d/network' scripts to do its job), is there a way for the script to gracefully recover when an interface cant be brought up? The way it just errors is not a nice feeling, especially when the only link into a remote router is that router's LAN ssh session.

IE, would it be possible to refactor the network bring-up code to have the LAN/switch *always* come up even if the wifi configuration is horribly mangled?

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by mystica555 <mystica@…>

Perhaps a better description of a good fix is "make UCI more robust to invalid wifi configurations, and somehow prevent LuCI from allowing these (wrong HT40 channel position) in the first place"

comment:2 Changed 6 years ago by nbd

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

the bridge issues should be fixed in latest trunk

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

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.