/* Get VLAN tag. */
s.vlan = -1;
- if (cfg->tag) {
- if (list_is_short(&port->ifaces)) {
- if (*cfg->tag >= 0 && *cfg->tag <= 4095) {
- s.vlan = *cfg->tag;
- }
- } else {
- /* It's possible that bonded, VLAN-tagged ports make sense. Maybe
- * they even work as-is. But they have not been tested. */
- VLOG_WARN("port %s: VLAN tags not supported on bonded ports",
- port->name);
- }
+ if (cfg->tag && *cfg->tag >= 0 && *cfg->tag <= 4095) {
+ s.vlan = *cfg->tag;
}
/* Get VLAN trunks. */
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;
}
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);
+ }
+
+ 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",
struct bridge *br;
size_t i;
+ /* Free space allocated for synthesized ports and interfaces, since we're
+ * in the process of reconstructing all of them. */
+ free_registered_blocks();
+
splinter_vlans = NULL;
sset_init(&splinter_ifaces);
for (i = 0; i < ovs_cfg->n_bridges; i++) {
{
size_t i;
- free_registered_blocks();
-
/* We iterate through 'br->cfg->ports' instead of 'ports' here because
* we're modifying 'ports'. */
for (i = 0; i < br->cfg->n_ports; i++) {