Message ID | 1498727811-14088-1-git-send-email-zhongbaisong@huawei.com |
---|---|
State | Accepted |
Headers | show |
On Thu, Jun 29, 2017 at 05:16:51PM +0800, zhongbaisong wrote:
> Signed-off-by: zhongbaisong <zhongbaisong@huawei.com>
I applied this to master, because it seems reasonable to refuse this,
but if it causes problems for someone who really wants to do it then
we'll have to revert it.
Thank you for your contribution!
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 71f73d6..925edfc 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -4432,6 +4432,9 @@ iface_set_mac(const struct bridge *br, const struct port *port, struct iface *if } else if (eth_addr_is_multicast(*mac)) { VLOG_ERR("interface %s: cannot set MAC to multicast address", iface->name); + } else if (eth_addr_is_zero(*mac)) { + VLOG_ERR("interface %s: cannot set MAC to all zero address", + iface->name); } else { int error = netdev_set_etheraddr(iface->netdev, *mac); if (error) {
Signed-off-by: zhongbaisong <zhongbaisong@huawei.com> --- vswitchd/bridge.c | 3 +++ 1 file changed, 3 insertions(+)