bridge: Set mac address when no physical ports attached.
authorJustin Pettit <jpettit@nicira.com>
Tue, 4 Dec 2012 03:05:08 +0000 (19:05 -0800)
committerJustin Pettit <jpettit@nicira.com>
Tue, 4 Dec 2012 05:23:55 +0000 (21:23 -0800)
Commit 1a8cfb41(bridge: Drop warning about thedefault bridge Ethernet
address.) attempted to reduce unnecessary logging, but deleted some code
that was necessary to set the mac address on local ports when no
physical ports were attached.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Issue #14126

vswitchd/bridge.c

index 28d2f19..b1d2feb 100644 (file)
@@ -1608,6 +1608,11 @@ bridge_pick_local_hw_addr(struct bridge *br, uint8_t ea[ETH_ADDR_LEN],
         }
     }
 
+    if (!found_addr) {
+        memcpy(ea, br->default_ea, ETH_ADDR_LEN);
+        *hw_addr_iface = NULL;
+    }
+
     hmapx_destroy(&mirror_output_ports);
 }