Developing lightweight computation at the DSG edge

Commit f033949e authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[qmp-system] [QinQ] Use 802.1ad VLANs on wired interfaces to enable...

[qmp-system] [QinQ] Use 802.1ad VLANs on wired interfaces to enable compatibility with switched Ethernet ports already using 802.1q

This breaks backwards compatibility with devices using previous qMp versions connected via cable.
parent cb379574
......@@ -51,18 +51,19 @@ qmp_set_vlan() {
uci set network.${viface}_${vid}=device
if [ -e "/sys/class/net/$dev/phy80211" ]; then
# 802.1Q VLANs for wireless interfaces
# 802.1q VLANs for wireless interfaces
uci set network.${viface}_${vid}.type=8021q
else
# [QinQ backport] 802.1q VLANs for wired interfaces
uci set network.${viface}_${vid}.type=8021q
# 802.1ad VLANs for wired interfaces
uci set network.${viface}_${vid}.type=8021ad
fi
uci set network.${viface}_${vid}.name=${viface}_${vid}
if [ -e "/sys/class/net/$dev/phy80211" ]; then
# 802.1Q VLANs for wireless interfaces
# 802.1q VLANs for wireless interfaces
uci set network.${viface}_${vid}.ifname='@'${viface}
else
# [QinQ backport] 802.1q VLANs for wired interfaces
# 802.1ad VLANs for wired interfaces
uci set network.${viface}_${vid}.ifname=$3
fi
uci set network.${viface}_${vid}.vid=${vid}
......
......@@ -375,13 +375,11 @@ qmp_configure_mesh() {
####
#### # If device is WAN use rescue for the VLAN tag
####
#### if [ $(qmp_get_devices wan | grep -c $dev) -gt 0 ]; then
#### qmp_set_vlan ${viface}_rescue $vid $dev
#### else
#### qmp_set_vlan $viface $vid $dev
#### fi
qmp_set_vlan $viface $vid $dev
if [ $(qmp_get_devices wan | grep -c $dev) -gt 0 ]; then
qmp_set_vlan ${viface}_rescue $vid $dev
else
qmp_set_vlan $viface $vid $dev
fi
}
# Configure IPv6 address only if mesh_prefix48 is defined (bmx6 does not need it)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment