diff --git a/board/common/rootfs/lib/infix/swup b/board/common/rootfs/lib/infix/swup index f2a52bf2..68c3c0c3 100755 --- a/board/common/rootfs/lib/infix/swup +++ b/board/common/rootfs/lib/infix/swup @@ -29,11 +29,14 @@ for netif in /sys/class/net/*; do num=$((num + 1)) done -# Verify that the 'port' group exists +# Verify that the 'port' and 'iface' groups exists +[ -d /etc/iproute2 ] || mkdir -p /etc/iproute2 if ! grep -q port /etc/iproute2/group; then - mkdir -p /etc/iproute2 echo "1 port" >> /etc/iproute2/group fi +if ! grep -q iface /etc/iproute2/group; then + echo "2 iface" >> /etc/iproute2/group +fi # Find and mark all switch ports ports=$(devlink port 2>/dev/null | awk '/flavour physical/{print $5}') @@ -48,6 +51,9 @@ for iface in $ports; do ip link set "$iface" group port done +# At least loopback in iface group +ip link set lo group iface + # Factory default: all switch ports in VLAN 1 of br0 # need to check for 'length > 0' because ip command # outputs empty json objects for non-port group ifs @@ -66,4 +72,5 @@ if [ ! -f /etc/network/interfaces.d/br0 ] && [ -n "$ports" ]; then vlan-id 1 vlan-raw-device br0 EOF + ip link set vlan1 group iface fi