From 93118b02fe54cedcc4d96863359c07bb6e0be7fd Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 30 Aug 2023 10:48:07 +0200 Subject: [PATCH] confd: Make physical port detection compatible with Linux 6.1 The old assumption was that only virtual links would have specific "linkinfo" data. However, somewhere between 5.19 and 6.1, DSA ports gained the ability to report its "conduit" interface via the "linkinfo" attribute. That's great, but unfortunately it broke our heuristic assumptions. The new assumption is that only physical ports will report a "parentbus" attribute. Let's see how long that will last :) --- board/netconf/rootfs/lib/infix/factory/gen-interfaces | 2 +- src/confd/src/ietf-interfaces.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/netconf/rootfs/lib/infix/factory/gen-interfaces b/board/netconf/rootfs/lib/infix/factory/gen-interfaces index c7acf42f..79a4c74b 100755 --- a/board/netconf/rootfs/lib/infix/factory/gen-interfaces +++ b/board/netconf/rootfs/lib/infix/factory/gen-interfaces @@ -19,7 +19,7 @@ phys_ifaces=$(ip -d -j link show | jq -r ' .[] | select(.link_type == "ether") | select(.group != "internal") | - select(has("linkinfo") | not) | + select(has("parentbus")) | .ifname') cat <