Bug 705701
Summary: | Host network is unavailable after killing guest | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Amos Kong <akong> |
Component: | kernel | Assignee: | Red Hat Kernel Manager <kernel-mgr> |
Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.7 | CC: | ailan, hiroshi.itani, jasowang, juzhang, michen, szhou |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-04 02:01:48 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 580948, 705997 |
Description
Amos Kong
2011-05-18 07:35:14 UTC
We can set a fixed mac to bridge before adding interfaces, then mac of bridge would not change, this problem will not occur. # strace brctl addbr br0 ... socket(PF_FILE, SOCK_STREAM, 0) = 3 ioctl(3, SIOCBRADDBR, 0x7fff0b1240c6) = 0 exit_group(0) = ? # ifconfig br0 (got a random address) br0 Link encap:Ethernet HWaddr 5a:34:f1:ba:8f:40 # strace brctl addif br0 eth0 (no ioctl releated with changing mac) ... ioctl(4, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=2}) = 0 close(4) = 0 ioctl(3, SIOCBRADDIF, 0x7fff57c335c0) = 0 exit_group(0) = ? # ifconfig br0 (got same addr as eth0) br0 Link encap:Ethernet HWaddr 00:22:68:16:c9:e8 # grep SIOCBRADDIF -nr net/bridge/ net/bridge/br_ioctl.c:409: case SIOCBRADDIF: net/bridge/br_ioctl.c:411: return add_del_if(br, rq->ifr_ifindex, cmd == SIOCBRADDIF); net/bridge/br_ioctl.c: int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ... case SIOCBRDELIF: return add_del_if(br, rq->ifr_ifindex, cmd == SIOCBRADDIF); ^ | | net/bridge/br_ioctl.c v static int add_del_if(struct net_bridge *br, int ifindex, int isadd) { ... if (isadd) ret = br_add_if(br, dev); ^ | | net/bridge/br_if.c: v int br_add_if(struct net_bridge *br, struct net_device *dev) { ... changed_addr = br_stp_recalculate_bridge_id(br); ^ | | net/bridge/br_stp_if.c: v bool br_stp_recalculate_bridge_id(struct net_bridge *br) { const unsigned char *br_mac_zero = (const unsigned char *)br_mac_zero_aligned; const unsigned char *addr = br_mac_zero; struct net_bridge_port *p; /* user has chosen a value so keep it */ <---- we can set a mac to bridge before adding interfaces if (br->flags & BR_SET_MAC_ADDR) return false; list_for_each_entry(p, &br->port_list, list) { if (addr == br_mac_zero || memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0) addr = p->dev->dev_addr; <---- a 'min' mac address in port_list will be set to bridge } root@t400:/project/rh/linux-2.6# brctl addbr br0 root@t400:/project/rh/linux-2.6# ifconfig br0 (got a random) br0 Link encap:Ethernet HWaddr 2e:83:f9:d6:4c:23 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@t400:/project/rh/linux-2.6# ifconfig br0 hw ether 12:23:34:56:78:56 root@t400:/project/rh/linux-2.6# ifconfig br0 br0 Link encap:Ethernet HWaddr 12:23:34:56:78:56 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@t400:/project/rh/linux-2.6# brctl addif br0 eth0 root@t400:/project/rh/linux-2.6# ifconfig br0 br0 Link encap:Ethernet HWaddr 12:23:34:56:78:56 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.7 and Red Hat does not plan to fix this issue the currently developed update. Contact your manager or support representative in case you need to escalate this bug. The same bug is reported in bz650097, it's duplicated with libvirt bz609463. Bug 650097 - network in host become unavailable for few secs when guest quit Bug 609463 - MAC address of virtual network bridge changes when TAP devices are added/removed *** This bug has been marked as a duplicate of bug 609463 *** |