diff options
author | Ethan Jackson <ethan@nicira.com> | 2011-11-29 13:22:18 -0800 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2011-11-30 14:52:00 -0800 |
commit | 69fdadb1a9528ffb1a800ebd6997c826e55df972 (patch) | |
tree | 3a26b13a99f79053087e108f0b259dd3ae22d29a /vswitchd | |
parent | 6a542738b2a59f98831fa36e6208d388c007d0b8 (diff) |
lacp: Require non-zero system ID.
It's a bug if LACP is configured with a system ID of zero. This
patch assert fails in this case.
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 85cc79e6..f79b69cd 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2677,6 +2677,11 @@ port_configure_lacp(struct port *port, struct lacp_settings *s) memcpy(s->id, port->bridge->ea, ETH_ADDR_LEN); } + if (eth_addr_is_zero(s->id)) { + VLOG_WARN("port %s: Invalid zero LACP system ID.", port->name); + return NULL; + } + /* Prefer bondable links if unspecified. */ priority = atoi(get_port_other_config(port->cfg, "lacp-system-priority", "0")); |