From: Ethan Jackson Date: Wed, 26 Jan 2011 21:14:42 +0000 (-0800) Subject: bridge: Cache bridge Ethernet address in struct bridge. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abe457eb08667d9a4e495eafba5a93fc5afab602;p=openvswitch bridge: Cache bridge Ethernet address in struct bridge. This patch stores each bridge's Ethernet address in its handle so that it may be used in future patches. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 3637ec65..a6b31243 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -188,6 +188,7 @@ struct bridge { struct list node; /* Node in global list of bridges. */ char *name; /* User-specified arbitrary name. */ struct mac_learning *ml; /* MAC learning table. */ + uint8_t ea[ETH_ADDR_LEN]; /* Bridge Ethernet Address. */ uint8_t default_ea[ETH_ADDR_LEN]; /* Default MAC. */ const struct ovsrec_bridge *cfg; @@ -753,6 +754,7 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg) br->name, strerror(error)); } } + memcpy(br->ea, ea, ETH_ADDR_LEN); dpid = bridge_pick_datapath_id(br, ea, hw_addr_iface); ofproto_set_datapath_id(br->ofproto, dpid);