aboutsummaryrefslogtreecommitdiff
path: root/lib/bond.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-04-12 18:28:04 -0700
committerEthan Jackson <ethan@nicira.com>2011-04-13 13:44:40 -0700
commitdc9908b3fb496843603227752d2b63709afe82c7 (patch)
tree8e16f867b148479fa1b96d88150e0fe0cf76a01f /lib/bond.c
parent59d7b2b65665d5d0db9a348789f7eba4b3f16d54 (diff)
bond: Revalidate flows when bond_is_tcp_hash() changes;
If LACP causes the return of bond_is_tcp_hash to change for whatever reason, all flows should be revalidated because they will have a different hash result.
Diffstat (limited to 'lib/bond.c')
-rw-r--r--lib/bond.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bond.c b/lib/bond.c
index b651d399..343c334b 100644
--- a/lib/bond.c
+++ b/lib/bond.c
@@ -456,6 +456,7 @@ void
bond_run(struct bond *bond, struct tag_set *tags)
{
struct bond_slave *slave;
+ bool is_tcp_hash = bond_is_tcp_hash(bond);
/* Update link status. */
if (bond->detect == BLSM_CARRIER
@@ -490,6 +491,14 @@ bond_run(struct bond *bond, struct tag_set *tags)
bond->next_fake_iface_update = time_msec() + 1000;
}
+ if (is_tcp_hash != bond_is_tcp_hash(bond)) {
+ struct bond_slave *slave;
+
+ HMAP_FOR_EACH (slave, hmap_node, &bond->slaves) {
+ tag_set_add(tags, slave->tag);
+ }
+ }
+
/* Invalidate any tags required by */
tag_set_union(tags, &bond->unixctl_tags);
tag_set_init(&bond->unixctl_tags);