Package: bridge-utils
Version: 1.6-2

I have the following bridge configuration:

auto br0
iface br0 inet dhcp
    bridge_ports   eno1
    bridge_stp     off
    bridge_maxwait 0
    bridge_fd      0
    bridge_hw      0c:c4:7a:33:46:a6
    post-up ip link set eno1 txqueuelen 4000
    post-up ip link set br0 txqueuelen 4000

Where 0c:c4:7a:33:46:a6 is the (real) MAC address of my eno1 interface.

After upgrading to the latest testing version of all the packages, I now
observe what appears to be the bridge_hw address most of the time being
ignored and some random address being used instead (76:95:e6:8c:c3:9e).
Here is a sample transcript:

$ ifup br0
Listening on LPF/br0/76:95:e6:8c:c3:9e
Sending on   LPF/br0/76:95:e6:8c:c3:9e
Sending on   Socket/fallback
DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 21
DHCPOFFER of 10.0.253.96 from 10.0.0.1
DHCPREQUEST for 10.0.253.96 on br0 to 255.255.255.255 port 67
DHCPACK of 10.0.253.96 from 10.0.0.1
bound to 10.0.253.96 -- renewal in 3159 seconds.

$ ip add show
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state 
UP group default qlen 4000
    link/ether 0c:c4:7a:33:46:a6 brd ff:ff:ff:ff:ff:ff
17: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 
group default qlen 4000
    link/ether 76:95:e6:8c:c3:9e brd ff:ff:ff:ff:ff:ff
    inet 10.0.253.96/8 brd 10.255.255.255 scope global dynamic br0
       valid_lft 6644sec preferred_lft 6644sec
    inet6 fe80::7495:e6ff:fe8c:c39e/64 scope link 
       valid_lft forever preferred_lft forever

Sometimes, however, I do get the correct MAC assigned. So to me this feels
like some kind of a race.

Based on the discussion in bug #725786 I was able to come up with the
following workaround which appears to work reliably:

auto br0
iface br0 inet dhcp
    bridge_ports   eno1
    bridge_stp     off
    bridge_maxwait 0
    bridge_fd      0
    bridge_hw      0c:c4:7a:33:46:a6
    hwaddress      0c:c4:7a:33:46:a6
    post-up ip link set br0 address 0c:c4:7a:33:46:a6
    post-up ip link set eno1 txqueuelen 4000
    post-up ip link set br0 txqueuelen 4000
    
Let me know if you need any additional information from my side or need
me to try anything.

Reply via email to