aboutsummaryrefslogtreecommitdiff
path: root/lib/lacp.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-04-18 15:32:30 -0700
committerEthan Jackson <ethan@nicira.com>2011-04-19 10:31:55 -0700
commiteb45889342dc2856b7225d129e2f3400950b2636 (patch)
treeca10186cd3416fb5404d3fcbbd208bd51e6fc934 /lib/lacp.c
parent45704b243abd1efcbb2ee26f342f07df4a7612f6 (diff)
lacp: Update attached status more often.
The attached status of slaves should be updated when certain global configuration settings change, or when a slave is destroyed.
Diffstat (limited to 'lib/lacp.c')
-rw-r--r--lib/lacp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/lacp.c b/lib/lacp.c
index 9b3b14b5..a842fbe4 100644
--- a/lib/lacp.c
+++ b/lib/lacp.c
@@ -132,8 +132,13 @@ lacp_configure(struct lacp *lacp, const struct lacp_settings *s)
lacp->name = xstrdup(s->name);
}
- memcpy(lacp->sys_id, s->id, ETH_ADDR_LEN);
- lacp->sys_priority = s->priority;
+ if (!eth_addr_equals(lacp->sys_id, s->id)
+ || lacp->sys_priority != s->priority) {
+ memcpy(lacp->sys_id, s->id, ETH_ADDR_LEN);
+ lacp->sys_priority = s->priority;
+ lacp->update = true;
+ }
+
lacp->active = s->active;
lacp->fast = s->fast;
}
@@ -225,6 +230,7 @@ lacp_slave_unregister(struct lacp *lacp, const void *slave_)
if (slave) {
slave_destroy(slave);
+ lacp->update = true;
}
}