]> git.proxmox.com Git - pve-common.git/commit
fix #545: interfaces: allow arbitrary bridge names in network config
authorStefan Hanreich <s.hanreich@proxmox.com>
Fri, 12 Apr 2024 08:07:32 +0000 (10:07 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 21 Apr 2024 09:22:10 +0000 (11:22 +0200)
commite68ebda4f1097e825d69e4c3e986bd529f874d0d
tree817e14f028246c6f574e11aad61da443e44d627d
parent55ba8536f00197b961a232e49f1b2867340a79aa
fix #545: interfaces: allow arbitrary bridge names in network config

Similar to other interface types, we can detect a bridge by the
presence of its bridge_ports attribute, rather than solely relying on
the "vmbr" ifname prefix heuristic. For OVS bridges we need to examine
the OVS type instead.

The check needs to be moved up since other prefixes could
theoretically be included in a bridge name and then would otherwise
get picked up wrongly.

Also added a warning for interfaces named vmbrX that are not bridges
to catch possible misconfigurations.

Originally-by: Jillian Morgan <jillian.morgan@primordial.ca>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
src/PVE/INotify.pm