On 15.09.2025 12:42, Thomas Lamprecht wrote:
Am 15.09.25 um 10:48 schrieb Gabriel Goller:
When creating a vlan zone and vnet, we get all the bridge interfaces
(slaves) and add them to the new vlan bridge. We get all the bridge
interfaces using `/sys/class/net` and then filter them using a regex.
This regex was missing the new `if` and `nic` prefixes which were
introduced with the pve-network-interface-pinning tool.
This is more of a stop-gap, we can probably remove the regex completely
as I don't see any reason to filter by "physical" interfaces here. If
there is a need, we can still run `ip link` and check the attributes
with `PVE::Network::ip_link_is_physical`.
We allow bond already now though, so replacing the current check with the
ip_link_is_physical would not really be an option FWICT.
Ah yeah true.
Reversing the regex to filter out stuff that quite definitively does not
make sense might be a better approach, like:
^(?!((fw(br|pr|ln)|tap|veth)\d+((p|i)\d+)?))
But really not that much more maintainable ;-) So even if it should result
in the same list, it might be better to replace dir_glob_foreach with
"manually" doing the loop here and use dedicated simple "next if expression"
checks to skip the interfaces that cannot make sense.
But your stop gap is already improving the status quo, so it's fine to
apply this patch here now already.
Agree.
I'll discuss with Stefan later (he's on vacation this week) if we can
remove this altogether.
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel