diff options
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan_core.c | 7 | ||||
-rw-r--r-- | net/8021q/vlan_dev.c | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 1f64cc9da1b0..f5ffc02729d6 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/export.h> | 5 | #include <linux/export.h> |
6 | #include "vlan.h" | 6 | #include "vlan.h" |
7 | 7 | ||
8 | bool vlan_do_receive(struct sk_buff **skbp) | 8 | bool vlan_do_receive(struct sk_buff **skbp, bool last_handler) |
9 | { | 9 | { |
10 | struct sk_buff *skb = *skbp; | 10 | struct sk_buff *skb = *skbp; |
11 | u16 vlan_id = skb->vlan_tci & VLAN_VID_MASK; | 11 | u16 vlan_id = skb->vlan_tci & VLAN_VID_MASK; |
@@ -14,7 +14,10 @@ bool vlan_do_receive(struct sk_buff **skbp) | |||
14 | 14 | ||
15 | vlan_dev = vlan_find_dev(skb->dev, vlan_id); | 15 | vlan_dev = vlan_find_dev(skb->dev, vlan_id); |
16 | if (!vlan_dev) { | 16 | if (!vlan_dev) { |
17 | if (vlan_id) | 17 | /* Only the last call to vlan_do_receive() should change |
18 | * pkt_type to PACKET_OTHERHOST | ||
19 | */ | ||
20 | if (vlan_id && last_handler) | ||
18 | skb->pkt_type = PACKET_OTHERHOST; | 21 | skb->pkt_type = PACKET_OTHERHOST; |
19 | return false; | 22 | return false; |
20 | } | 23 | } |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index c8cf9391417e..bc2528624583 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -470,10 +470,12 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change) | |||
470 | { | 470 | { |
471 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 471 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; |
472 | 472 | ||
473 | if (change & IFF_ALLMULTI) | 473 | if (dev->flags & IFF_UP) { |
474 | dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1); | 474 | if (change & IFF_ALLMULTI) |
475 | if (change & IFF_PROMISC) | 475 | dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1); |
476 | dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1); | 476 | if (change & IFF_PROMISC) |
477 | dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1); | ||
478 | } | ||
477 | } | 479 | } |
478 | 480 | ||
479 | static void vlan_dev_set_rx_mode(struct net_device *vlan_dev) | 481 | static void vlan_dev_set_rx_mode(struct net_device *vlan_dev) |