aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index d1f027c41e7..c0e260870c0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2622,6 +2622,7 @@ int __netif_receive_skb(struct sk_buff *skb)
2622{ 2622{
2623 struct packet_type *ptype, *pt_prev; 2623 struct packet_type *ptype, *pt_prev;
2624 struct net_device *orig_dev; 2624 struct net_device *orig_dev;
2625 struct net_device *master;
2625 struct net_device *null_or_orig; 2626 struct net_device *null_or_orig;
2626 struct net_device *null_or_bond; 2627 struct net_device *null_or_bond;
2627 int ret = NET_RX_DROP; 2628 int ret = NET_RX_DROP;
@@ -2642,11 +2643,12 @@ int __netif_receive_skb(struct sk_buff *skb)
2642 2643
2643 null_or_orig = NULL; 2644 null_or_orig = NULL;
2644 orig_dev = skb->dev; 2645 orig_dev = skb->dev;
2645 if (orig_dev->master) { 2646 master = ACCESS_ONCE(orig_dev->master);
2646 if (skb_bond_should_drop(skb)) 2647 if (master) {
2648 if (skb_bond_should_drop(skb, master))
2647 null_or_orig = orig_dev; /* deliver only exact match */ 2649 null_or_orig = orig_dev; /* deliver only exact match */
2648 else 2650 else
2649 skb->dev = orig_dev->master; 2651 skb->dev = master;
2650 } 2652 }
2651 2653
2652 __get_cpu_var(netdev_rx_stat).total++; 2654 __get_cpu_var(netdev_rx_stat).total++;