With this patch, when a user attempts to configure LACP with an invalid system ID, OVS will fail to create the bond and warn. This behavior seems safer then defaulting to the bridge Ethernet Address which may surprise users.
Bug #8710. Signed-off-by: Ethan Jackson <et...@nicira.com> --- vswitchd/bridge.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index b45b972..4614ea1 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2664,9 +2664,14 @@ port_configure_lacp(struct port *port, struct lacp_settings *s) s->name = port->name; 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) { + if (system_id) { + if (sscanf(system_id, ETH_ADDR_SCAN_FMT, + ETH_ADDR_SCAN_ARGS(s->id)) != ETH_ADDR_SCAN_COUNT) { + VLOG_WARN("port %s: LACP system ID (%s) must be an Ethernet" + " Address.", port->name, system_id); + return NULL; + } + } else { memcpy(s->id, port->bridge->ea, ETH_ADDR_LEN); } -- 1.7.7.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev