Bug 903134

Summary: don't change bridge mac address when physical nic is plugged to it
Product: Red Hat Enterprise Linux 6 Reporter: David Jaša <djasa>
Component: bridge-utilsAssignee: Thomas Woerner <twoerner>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: dyasny, psimerda
Target Milestone: beta   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-23 10:32:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Jaša 2013-01-23 09:51:53 UTC
Description of problem:
don't change bridge mac address when physical nic is plugged to it

Version-Release number of selected component (if applicable):
bridge-utils-1.2-10.el6.x86_64
kernel-2.6.32-355.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a bridge: brctl addbr mac_test
2. watch bridge mac address
3. plug physical device to the bridge: brctl addif mac_test eth0
4. watch bridge mac address again
  
Actual results:
mac addresses in 2. and 4. differ

Expected results:
mac addresses are the same

Additional info:
Sometimes bridges are generated with 00:00:00:00:00:00 address. That may complicate things and as such, it should be avoided, too (a separate bug?)

[root@dhcp-29-7 ~]# brctl addbr br1
[root@dhcp-29-7 ~]# ip l
(...)
94: br1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
    link/ether 9e:03:90:e9:79:50 brd ff:ff:ff:ff:ff:ff
[root@dhcp-29-7 ~]# brctl delif br0 eth0
[root@dhcp-29-7 ~]# brctl addif br1 eth0
[root@dhcp-29-7 ~]# ip l
(...)
94: br1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
    link/ether f0:de:f1:04:c0:fa brd ff:ff:ff:ff:ff:ff

effectively, br1 took mac address of eth0 that previously also br0 bridge interface had so at this time, there are two bridges with the same mac address. Not good.

Comment 1 Pavel Šimerda (pavlix) 2013-01-23 10:18:16 UTC
Your test is unfortunately wrong. You have to set the MAC address when (just after) creating the bridge, before you enslave any interfaces. And please test with the 'ip' command instead of 'brctl' as the behavior might be different.

Comment 2 David Jaša 2013-01-23 10:32:10 UTC
that suggests bug in initscripts that they don't persist bridge mac address.

> test with the 'ip' command instead of 'brctl' as the behavior might be different.

ip on RHEL6 can't speak bridges:

# ip l add br1 type bridge
RTNETLINK answers: Operation not supported

Comment 3 Pavel Šimerda (pavlix) 2013-01-25 01:21:52 UTC
(In reply to comment #2)
> ip on RHEL6 can't speak bridges:
> 
> # ip l add br1 type bridge
> RTNETLINK answers: Operation not supported

Sorry for that. We have to keep up with the risk that ioctl (using brctl) won't work exactly the same.