From: Ethan Jackson Date: Wed, 30 Nov 2011 03:03:52 +0000 (-0800) Subject: bridge: Honor lacp-system-id other_config setting. X-Git-Tag: v1.3.0~7 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=99553eeac5c6a422a7622ea8be801e8636699753;p=sliver-openvswitch.git bridge: Honor lacp-system-id other_config setting. The bridge code was completely ignoring the lacp-system-id setting. Future patches will add tests which would have caught this issue. Bug #8516. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index e759478c5..21388683b 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2616,7 +2616,7 @@ enable_lacp(struct port *port, bool *activep) static struct lacp_settings * port_configure_lacp(struct port *port, struct lacp_settings *s) { - const char *lacp_time; + const char *lacp_time, *system_id; long long int custom_time; int priority; @@ -2625,7 +2625,13 @@ port_configure_lacp(struct port *port, struct lacp_settings *s) } s->name = port->name; - memcpy(s->id, port->bridge->ea, ETH_ADDR_LEN); + + system_id = get_port_other_config(port->cfg, "lacp-system-id", NULL); + if (!system_id + || sscanf(system_id, ETH_ADDR_SCAN_FMT, + ETH_ADDR_SCAN_ARGS(s->id)) != ETH_ADDR_SCAN_COUNT) { + memcpy(s->id, port->bridge->ea, ETH_ADDR_LEN); + } /* Prefer bondable links if unspecified. */ priority = atoi(get_port_other_config(port->cfg, "lacp-system-priority",