]> git.proxmox.com Git - mirror_ifupdown2.git/commit
addons: bridge: add multi bridge support when bridge_set_static_mac_from_port=yes
authorJulien Fortin <julien@cumulusnetworks.com>
Tue, 8 Dec 2020 01:36:22 +0000 (02:36 +0100)
committerJulien Fortin <jfortin@nvidia.com>
Wed, 30 Jun 2021 16:11:25 +0000 (18:11 +0200)
commit8b99615b830daf7edf27cfb4d49fe0f757df955a
tree6e7afd6bfc771b548478b20a6cb63d8065894fb3
parent31bddf7647f3e9c916d1fd9831d85cc9d82acb11
addons: bridge: add multi bridge support when bridge_set_static_mac_from_port=yes

The policy bridge_set_static_mac_from_port was added to ifupdown2 back when we didn't
support a mix of traditional and vlan-aware bridges. The code wasn't revisited after
such config was allowed on the system.

how to repro:

- set bridge_set_static_mac_from_port=yes in module_globals of:
/var/lib/ifupdown2/policy.d/bridge.json

auto br1
iface br1
    bridge-vlan-aware no
    bridge-stp off
    bridge-ports swp1

auto bridge
iface bridge
    bridge-ports swp7
    bridge-vids 10
    bridge-vlan-aware yes

auto vlan10
iface vlan10
    address 192.168.0.20/32
    vlan-id 10
    vlan-raw-device bridge

br1 and bridge will share the same mac address (swp1's mac).

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
ifupdown2/addons/bridge.py