aboutsummaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-11-29 19:03:52 -0800
committerEthan Jackson <ethan@nicira.com>2011-11-30 13:44:08 -0800
commite567943d3bfc1db298efe04b44c7d0b284d0c459 (patch)
tree417ec01fa2fddd8d8365df2ad10836a91f8cf327 /vswitchd
parent2daadadd2f70c65447e067ed34ebfa5dacb06c71 (diff)
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.
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/bridge.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 51766b9f..85cc79e6 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2660,7 +2660,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;
@@ -2669,7 +2669,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",