bond: service netpoll arp queue on master device
authorAmerigo Wang <amwang@redhat.com>
Thu, 17 Feb 2011 23:43:34 +0000 (23:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Feb 2011 04:11:54 +0000 (20:11 -0800)
Neil pointed out that we can't send ARP reply on behalf of slaves,
we need to move the arp queue to their bond device.

Signed-off-by: WANG Cong <amwang@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/netpoll.c

index f68e694..06be243 100644 (file)
@@ -193,6 +193,17 @@ void netpoll_poll_dev(struct net_device *dev)
 
        poll_napi(dev);
 
+       if (dev->priv_flags & IFF_SLAVE) {
+               if (dev->npinfo) {
+                       struct net_device *bond_dev = dev->master;
+                       struct sk_buff *skb;
+                       while ((skb = skb_dequeue(&dev->npinfo->arp_tx))) {
+                               skb->dev = bond_dev;
+                               skb_queue_tail(&bond_dev->npinfo->arp_tx, skb);
+                       }
+               }
+       }
+
        service_arp_queue(dev->npinfo);
 
        zap_completion_queue();