#20739: VLAN configuration doesn't work on the web interface (LuCi) ---------------------------+------------------------ Reporter: achmetow84@… | Owner: developers Type: defect | Status: new Priority: normal | Milestone: Component: packages | Version: Trunk Resolution: | Keywords: ---------------------------+------------------------
Comment (by anonymous): I can confirm this behavior, as I ran into the exact same problem. VLANs created through web interface are created as eth0.XXX - but eth1 is the LAN interface. A manual change in the config (if you didn't lock yourself out of the router by this bug!) to eth1.XXX corrects the problem. The LUA file is the right source of the bug. Changeset 7675 from October 2011 (http://luci.subsignal.org/trac/changeset/7675) introduced the heuristic to infer ethX device name from the 'swconfig dev help' command, with a fallback to eth0. At the time the lua function get_interfaces (self) line 488 is called, the hash baseof is initialized as an empty hash {} in line 493. In line 519, we are trying to lookup the base for s.device (which is passed into the function from the ici-lua binding - anything that looks like network.@switch_vlan...") which since we are looking up in an empty hash fails. Since this check fails in line 520, we attempt to match s.device against the regular expression "etc%d" in line 521. This fails as well, for instance, for me this value is 'network.@switch_vlan[0].device='switch0'' Thus, the next call in line 523 is running swconfig dev s.device help. It's attempting to match that output to find ethic. Since that fails too, it sets base to ethic (hard coded) in line 529. On the Archer C7 the output of swconfig above is: switch0: ag71xx- mdio.0(Atheros AR8327), ports: 7 (cpu @ 0), vlans: 128 ag71xx-mdio.0 is the BUS ID set by the network driver. This code probably hasn't worked on other devices such as the WDR4300, but incidentally, they used eth0 as the LAN interface, so the hard coded fallback was appropriate. -- Ticket URL: <https://dev.openwrt.org/ticket/20739#comment:3> OpenWrt <http://openwrt.org> Opensource Wireless Router Technology _______________________________________________ openwrt-tickets mailing list openwrt-tickets@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets