mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
vlan: dont drop packets from unknown vlans in promiscuous mode
Roger Luethi noticed packets for unknown VLANs getting silently dropped even in promiscuous mode. Check for promiscuous mode in __vlan_hwaccel_rx() and vlan_gro_common() before drops. As suggested by Patrick, mark such packets to have skb->pkt_type set to PACKET_OTHERHOST to make sure they are dropped by IP stack. Reported-by: Roger Luethi <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> CC: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
9262919531
commit
173e79fb70
1 changed files with 10 additions and 4 deletions
|
|
@ -24,8 +24,11 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
|
|||
|
||||
if (vlan_dev)
|
||||
skb->dev = vlan_dev;
|
||||
else if (vlan_id)
|
||||
goto drop;
|
||||
else if (vlan_id) {
|
||||
if (!(skb->dev->flags & IFF_PROMISC))
|
||||
goto drop;
|
||||
skb->pkt_type = PACKET_OTHERHOST;
|
||||
}
|
||||
|
||||
return (polling ? netif_receive_skb(skb) : netif_rx(skb));
|
||||
|
||||
|
|
@ -102,8 +105,11 @@ vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
|
|||
|
||||
if (vlan_dev)
|
||||
skb->dev = vlan_dev;
|
||||
else if (vlan_id)
|
||||
goto drop;
|
||||
else if (vlan_id) {
|
||||
if (!(skb->dev->flags & IFF_PROMISC))
|
||||
goto drop;
|
||||
skb->pkt_type = PACKET_OTHERHOST;
|
||||
}
|
||||
|
||||
for (p = napi->gro_list; p; p = p->next) {
|
||||
NAPI_GRO_CB(p)->same_flow =
|
||||
|
|
|
|||
Loading…
Reference in a new issue