CumulusNetworks / ifupdown2

GNU General Public License v2.0
158 stars 72 forks source link

`bridge-hw eth0` is ignored #290

Open albert-a opened 7 months ago

albert-a commented 7 months ago

Bridge is assigned arbitrary address, not the slave interface address. I want the hardware address to be inherited from the interface it enslaves (like in ifupdown package):

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet dhcp
    bridge-ports eth0
    bridge-hw eth0

But unfortunately bridge-hw eth0 directive is ignored.

julienfortin commented 7 months ago

There's no support for bridge-hw in ifupdown2 today. A work around could be to manually set the mac using the hwaddress attribute or something a bit more dynamic like: post-up inherit_mac_from.sh and in that inherit_mac_from script you code the logic to extract eth0 mac and set it on the bridge.

julienfortin commented 7 months ago

Additionally, feel free to submit a PR to add native support for this attribute in ifupdown2