common: nameif: Drop the assumption that any eN interface is a port

The port marker is intended to be used as a hint to the
auto-factory-config generator, so that it can create a bridge for all
switch ports by default. Therefore, revert to only include ports that
devlink reports as "flavour physical".

If we want to test this functionality in QEMU, we can use Rocker, the
virtual switch, instead.
This commit is contained in:
Tobias Waldekranz
2023-08-30 12:45:51 +02:00
committed by Joachim Wiberg
parent 93118b02fe
commit a88391afa2
-7
View File
@@ -35,12 +35,5 @@ for iface in $ports; do
ip link set "$iface" group port
done
# Testing, e.g., using /etc/mactab may use TAP devices to create
# emulated switch ports, make sure to mark them as well
ports=$(ip -json link | jq -r '.[].ifname | match("^e[[:digit:]]+").string')
for iface in $ports; do
ip link set "$iface" group port
done
# At least loopback in iface group
ip link set lo group iface