Chadster766 / McDebian

Linksys WRT3200ACM, WRT1900AC, WRT1900ACS, WRT1200AC and WRT32X Router Debian Implementation
98 stars 14 forks source link

oops in br_vlan_enabled #67

Closed sfrost closed 4 years ago

sfrost commented 4 years ago

Greetings,

This isn't really an issue with mcDebian, per se, but it impacts what I'm trying to do with my WRT1900ACv1 and mcDebian, and I am hoping you can provide some suggestions.

Specifically, I'm trying to bridge between a regular interface and a VLAN on another interface and I'm getting:

Unable to handle kernel NULL pointer dereference at virtual address "00000558"

as discussed here: https://www.spinics.net/lists/netdev/msg552275.html this seems to be a known and likely fixed issue, at least in the 5-series of the kernel, but it's definitely something I'm still running into with 4.19.91.

Have you tried running a 5-series kernel on WRT1900ac's? The one I'm playing with at the moment is a spare (at least until I can get this issue sorted...) and so I'm happy to test things out on it, build and try new kernels and such. I can certainly get on to the console of it if needed too.

Any thoughts? I'm a bit surprised that this hasn't been fixed in Debian, but as far as I can tell it hasn't been... :/

Thanks!

Stephen

Chadster766 commented 4 years ago

I'm not sure why you get that oops because I use VLAN and don't get it.

Below are some examples of my config:

Example of just to bridge interfaces with different IP Subnets using iptables to isolate between them.

auto wan
iface wan inet dhcp
        pre-up iptables-restore < /etc/iptables.up.rules
        pre-up ifup --ignore-errors br0

iface wan inet6 auto
        pre-up ip6tables-restore < /etc/ip6tables.up.rules

iface br0 inet static
        bridge_ports lan1 lan2
        address 10.10.10.1
        netmask 255.255.255.0
        network 10.10.10.0
        broadcast 10.10.10.255
        pre-up /etc/network/mcdebian-model-check
        pre-up ifup br1

iface br0 inet6 static
        address fc00::1:1
        netmask 63

iface br1 inet static
        bridge_ports lan3 lan4
        address 192.168.50.1
        netmask 255.255.255.0
        network 192.168.50.0
        broadcast 192.168.50.255

Example of a VLAN isolated wireless:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

#auto eth0 -- Do not uncomment it will cause major startup delays
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto lan1
iface lan1 inet manual
        #locally administered mac address
        hwaddress ether 02:3b:45:92:19:06

auto lan2
iface lan2 inet manual
        hwaddress ether 02:4a:dc:6f:cd:7d

auto lan3
iface lan3 inet manual
        hwaddress ether 02:3d:2b:d9:b5:d5

auto lan4
iface lan4 inet manual
        hwaddress ether 02:e0:96:70:5f:c3

auto wlp1s0
iface wlp1s0 inet manual
        #locally administered mac address that ends with zero for multi SSID mac address generation
        pre-up ip link set wlp1s0 address 02:7a:03:6d:bb:40

auto wlp2s0
iface wlp2s0 inet manual
        pre-up ip link set wlp2s0 address 02:b1:77:35:c7:e0

auto wan
iface wan inet manual
        pre-up /etc/network/mcdebian-set-wan-mac-address
        #pre-up iptables-restore < /etc/iptables.up.rules
#iface wan inet6 auto
#       pre-up ip6tables-restore < /etc/ip6tables.up.rules
#       up sleep 5
        #The below line shouldn't be required with McDebian IPv6 NAT and the McDebian dhcpd6 server setup
        #up dhclient -1 -6 -cf /etc/dhcp/dhclient6.conf -lf /var/lib/dhcp/dhclient6.wan.leases -v wan || true

auto br0
iface br0 inet static
        bridge_hw 02:2d:50:bd:ca:13
        bridge_ports wan
        address 192.168.60.2
        netmask 255.255.255.0
        network 192.168.60.0
        broadcast 192.168.60.255
        post-up /etc/network/mcdebian-wrt1900acV1-wrt3200-wlan
        post-up ip route add default dev br0

auto wan.4 wan.20 br1 br2

iface wan.4 inet manual
        vlan-raw-device wan

iface wan.20 inet manual
        vlan-raw-device wan

iface br1 inet manual
        bridge_ports wan.4

iface br2 inet manual
        bridge_ports wan.20

#iface br0 inet6 static
#       address fc00::1
#       netmask 64
sfrost commented 4 years ago

I'm not sure exactly what the issue is, but I notice that your bridges that use VLANs don't seem to actually bridge any interfaces together..?

This is the setup I'm trying to use that's causing the oops:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto lan1
iface lan1 inet manual
        hwaddress ether 9e:d7:4f:07:19:95

auto lan1.101
iface lan1.101 inet manual
        vlan-raw-device lan1

# Server network
auto lan1.105
iface lan1.105 inet static
        vlan-raw-device lan1
        address 10.10.5.1/24
        dns-nameservers 10.10.5.10
        dns-search snowman.net

auto lan2
iface lan2 inet manual
        hwaddress ether 9a:19:3f:9c:29:dd

auto lan3
iface lan3 inet manual
        hwaddress ether 2a:a5:1e:bf:a8:2e

auto lan4
iface lan4 inet manual
        hwaddress ether c6:39:34:53:59:ab

iface wlp1s0 inet manual
        pre-up up link set wlp1s0 address 52:ba:1b:a2:72:00

iface wlp2s0 inet manual
        pre-up up link set wlp2s0 address 5a:fc:3d:c7:b0:d0

# Upstream
auto wan
iface wan inet static
        address 96.255.250.162/24
        gateway 96.255.250.1
        pre-up iptables-restore < /etc/iptables.up.rules
        pre-up ifup --ignore-errors br0

# Client network
auto br0
iface br0 inet static
        bridge_hw b2:1b:b8:18:f4:60
        bridge_ports lan1.101 lan2 lan3 lan4
        address 10.10.1.26/24
        pre-up /etc/network/mcdebian-model-check
        #bridge_ports lan2 lan3 lan4        
        #address 10.10.1.1/24

If I take the 'lan1.101' out of the bridge_ports list (as shown, commented, so that I can boot the system), it works, but as long as that's in there, it'll oops on boot, with the exact same error that's in the link that I referenced.

sfrost commented 4 years ago

I didn't really expect anything different, but I did also try using 'wan' instead of 'lan1' and had what seemed to be the same issue.

sfrost commented 4 years ago

Not really following what you're describing there...

What I'd like to do is have a 'trunk' (multiple VLANs across a single port) from my server to the WRT1900AC, and then have the WRT1900AC split out that trunk and bridge to the other interfaces (without VLAN tagging). Imagine something like:

wan - trunk with VLAN tagging which has VLAN 1, 2, 3, 4 lan1 - bridged with vlan1 using br1 lan2 - bridged with vlan2 using br2 lan3 - bridged with vlan3 using br3 lan4 - bridged with vlan4 using br4

Where the traffic on lan1/2/3/4 isn't VLAN tag'd, instead it gets tagged when it's combined on to the wan trunk and sent to the server.

This is a reasonably common type of arrangement, just happens that, unfortunately, it seems to cause an oops under the current kernel.

Chadster766 commented 4 years ago

I'm going to test the below config to see if I get the oops:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto lan1
iface lan1 inet manual

auto lan2
iface lan2 inet manual

auto lan3
iface lan3 inet manual

auto lan4
iface lan4 inet manual

iface wlp1s0 inet manual

iface wlp2s0 inet manual

auto wan
iface wan inet static
        #pre-up iptables-restore < /etc/iptables.up.rules
        pre-up ifup --ignore-errors br0

iface wan inet6 auto
        #pre-up ip6tables-restore < /etc/ip6tables.up.rules

#WAN (Untagged) Typically VLAN1
iface br0 inet static
        bridge_ports wan lan1
        aaddress x.x.x.x
        netmask 255.255.255.0
        network x.x.x.0
        broadcast x.x.x.255
        pre-up /etc/network/mcdebian-model-check

#Tagged WAN VLANs   
auto wan.2
iface wan.2 inet manual
        vlan-raw-device wan

auto wan.3
iface wan.3 inet manual
        vlan-raw-device wan

auto wan.4
iface wan.4 inet manual
        vlan-raw-device wan

#LAN Bridge VLAN Interfaces
auto br2.2
iface br2.2 inet manual
    bridge_ports wan.2 lan2

auto br3.3
iface br3.3 inet manual
    bridge_ports wan.3 lan3

auto br4.4
iface br4.4 inet manual
    bridge_ports wan.4 lan4
Chadster766 commented 4 years ago

I got the oops too!

Chadster766 commented 4 years ago

I guess its time to move McDebian to kernel 5.4.39

Chadster766 commented 4 years ago

I'm beta testing McDebian with kernel version 5.6.14 which seems to work properly and displays no oops.

Chadster766 commented 4 years ago

Resolved in upcoming release

69