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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index bcc490cc9452..1c8a0ce473a8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -80,6 +80,7 @@
80#include <linux/types.h> 80#include <linux/types.h>
81#include <linux/kernel.h> 81#include <linux/kernel.h>
82#include <linux/hash.h> 82#include <linux/hash.h>
83#include <linux/slab.h>
83#include <linux/sched.h> 84#include <linux/sched.h>
84#include <linux/mutex.h> 85#include <linux/mutex.h>
85#include <linux/string.h> 86#include <linux/string.h>
@@ -2483,6 +2484,7 @@ int netif_receive_skb(struct sk_buff *skb)
2483{ 2484{
2484 struct packet_type *ptype, *pt_prev; 2485 struct packet_type *ptype, *pt_prev;
2485 struct net_device *orig_dev; 2486 struct net_device *orig_dev;
2487 struct net_device *master;
2486 struct net_device *null_or_orig; 2488 struct net_device *null_or_orig;
2487 struct net_device *null_or_bond; 2489 struct net_device *null_or_bond;
2488 int ret = NET_RX_DROP; 2490 int ret = NET_RX_DROP;
@@ -2503,11 +2505,12 @@ int netif_receive_skb(struct sk_buff *skb)
2503 2505
2504 null_or_orig = NULL; 2506 null_or_orig = NULL;
2505 orig_dev = skb->dev; 2507 orig_dev = skb->dev;
2506 if (orig_dev->master) { 2508 master = ACCESS_ONCE(orig_dev->master);
2507 if (skb_bond_should_drop(skb)) 2509 if (master) {
2510 if (skb_bond_should_drop(skb, master))
2508 null_or_orig = orig_dev; /* deliver only exact match */ 2511 null_or_orig = orig_dev; /* deliver only exact match */
2509 else 2512 else
2510 skb->dev = orig_dev->master; 2513 skb->dev = master;
2511 } 2514 }
2512 2515
2513 __get_cpu_var(netdev_rx_stat).total++; 2516 __get_cpu_var(netdev_rx_stat).total++;