bond: Only drop packets that indicate moves on SLB bonds.
authorBen Pfaff <blp@nicira.com>
Mon, 21 Nov 2011 21:18:25 +0000 (13:18 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 21 Nov 2011 21:18:25 +0000 (13:18 -0800)
SLB bonds, for important reasons, drop most incoming packets that indicate
that a MAC has moved to the bond from another port.  These reasons do not
apply to active-backup bonds, but until now OVS has still dropped them.

This fixes the problem.  Behavior of SLB bonds and TCP bonds in SLB
fallback mode is unaffected.

Cross-port of patch f931a4c93075e from master.

Bug #7928.

vswitchd/bridge.c

index 86c5040..f1adf4e 100644 (file)
@@ -3049,11 +3049,13 @@ is_admissible(struct bridge *br, const struct flow *flow, bool have_packet,
          * to the exception is if we locked the learning table to avoid
          * reflections on bond slaves.  If this is the case, just drop the
          * packet now. */
-        src_idx = mac_learning_lookup(br->ml, flow->dl_src, vlan,
-                                      &is_grat_arp_locked);
-        if (src_idx != -1 && src_idx != in_port->port_idx &&
-            (!is_gratuitous_arp(flow) || is_grat_arp_locked)) {
+        if (in_port->bond_mode != BM_AB) {
+            src_idx = mac_learning_lookup(br->ml, flow->dl_src, vlan,
+                                          &is_grat_arp_locked);
+            if (src_idx != -1 && src_idx != in_port->port_idx &&
+                (!is_gratuitous_arp(flow) || is_grat_arp_locked)) {
                 return false;
+            }
         }
     }