aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-06-27 13:18:19 -0700
committerEthan Jackson <ethan@nicira.com>2011-06-27 14:03:21 -0700
commit7ba7dcf014a9f830f99967907534bbd5e32dfc36 (patch)
tree08e5840298f56e3681f5da1793361b941ab6aa5e
parent22bcc0e70becd88bf895c44885d63704affe4284 (diff)
bond: Drop packets on backup slaves.
Currently, OVS accepts incoming traffic on all slaves participating in a bond. In Linux active-backup bonding, all traffic which comes in on backup slaves is dropped. This patch causes OVS to do the same. Bug #6125.
-rw-r--r--lib/bond.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/bond.c b/lib/bond.c
index 913a3071..d8e0966e 100644
--- a/lib/bond.c
+++ b/lib/bond.c
@@ -573,6 +573,22 @@ bond_check_admissibility(struct bond *bond, const void *slave_,
}
}
+ /* Drop all packets which arrive on backup slaves. This is similar to how
+ * Linux bonding handles active-backup bonds. */
+ if (bond->balance == BM_AB) {
+ struct bond_slave *slave = bond_slave_lookup(bond, slave_);
+
+ *tags |= bond_get_active_slave_tag(bond);
+ if (bond->active_slave != slave) {
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
+
+ VLOG_WARN_RL(&rl, "active-backup bond received packet on backup"
+ " slave (%s) destined for " ETH_ADDR_FMT,
+ slave->name, ETH_ADDR_ARGS(eth_dst));
+ return BV_DROP;
+ }
+ }
+
/* Drop all packets for which we have learned a different input port,
* because we probably sent the packet on one slave and got it back on the
* other. Gratuitous ARP packets are an exception to this rule: the host