From dc9908b3fb496843603227752d2b63709afe82c7 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Tue, 12 Apr 2011 18:28:04 -0700 Subject: [PATCH] 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. --- lib/bond.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- 2.30.2