]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
macvlan: Forward unicast frames in bridge mode to lowerdev
authorDavid Ward <david.ward@ll.mit.edu>
Thu, 19 May 2011 02:53:20 +0000 (02:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 May 2011 01:01:18 +0000 (21:01 -0400)
Unicast frames between macvlan interfaces in bridge mode are not otherwise
sent to network taps on the lowerdev (as all other macvlan frames are), so
forward the frames to the receive queue of the lowerdev first.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c

index d72a70615c0f140d893203dcb90779bea67a3fb1..d6aeaa5f25eaa86df9780d03783b548631e92262 100644 (file)
@@ -238,10 +238,8 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)
 
                dest = macvlan_hash_lookup(port, eth->h_dest);
                if (dest && dest->mode == MACVLAN_MODE_BRIDGE) {
-                       unsigned int length = skb->len + ETH_HLEN;
-                       int ret = dest->forward(dest->dev, skb);
-                       macvlan_count_rx(dest, length,
-                                        ret == NET_RX_SUCCESS, 0);
+                       /* send to lowerdev first for its network taps */
+                       vlan->forward(vlan->lowerdev, skb);
 
                        return NET_XMIT_SUCCESS;
                }