@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network
-PKG_VERSION:=10
+PKG_VERSION:=11
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@@ -119,17 +119,15 @@ if ! uci -q get network.$SWITCHDEV > /dev/null || [ "$FORCEPARSE" = '1' ] ; then
uci set network.${SWITCHDEV}_1.vlan=1
uci set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
+ # This defines the VLAN for WAN ports inside the switch.
+ # This is required even if the WAN eth is separate, but the WAN port is in the switch!
if [ "$WANDEV" = "$SWITCHDEV" ] || ! [ -z "$WAN_PORTS" ]; then
uci set network.${SWITCHDEV}_2=switch_vlan
uci set network.${SWITCHDEV}_2.device=$SWITCHHW
uci set network.${SWITCHDEV}_2.vlan=2
uci set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
-
- enableAutoConf "$WANDEV.2"
- else
- enableAutoConf "$WANDEV"
fi
-
+
uci set network.${SWITCHDEV}_3=switch_vlan
uci set network.${SWITCHDEV}_3.device=$SWITCHHW
uci set network.${SWITCHDEV}_3.vlan=3
@@ -139,10 +137,16 @@ if ! uci -q get network.$SWITCHDEV > /dev/null || [ "$FORCEPARSE" = '1' ] ; then
uci set network.ethmesh.ifname="$SWITCHDEV.3"
+ # This defines the WAN interface. We use the VLAN ID only if we do NOT have a separate eth.
+ # This is different from the criterion for the WAN port dealt with above!
+ # If the WANDEV is different from the SWITCHDEV, but the WAN port is in the switch,
+ # the WAN eth has to be connected to the switch untagged!
if [ "$WANDEV" = "$SWITCHDEV" ]; then
- uci set network.wan.ifname=$WANDEV.2
+ enableAutoConf "$WANDEV.2"
+ uci set network.wan.ifname="$WANDEV.2"
else
- uci set network.wan.ifname=$WANDEV
+ enableAutoConf "$WANDEV"
+ uci set network.wan.ifname="$WANDEV"
fi
uci commit network