Skip to content
Snippets Groups Projects
Commit e769fcec authored by Vishakha Narvekar's avatar Vishakha Narvekar Committed by David S. Miller
Browse files

net: 8021q: skip packets if the vlan is down


If the vlan is down, free the packet instead of proceeding with other
processing, or counting it as received.  If vlan interfaces are used
as slaves for bonding, with arp monitoring for connectivity, if the rx
counter is seen to be incrementing, then the bond device will not
observe that the interface is down.

CC: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarVishakha Narvekar <Vishakha.Narvekar@dell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90caccdd
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,12 @@ bool vlan_do_receive(struct sk_buff **skbp)
if (unlikely(!skb))
return false;
if (unlikely(!(vlan_dev->flags & IFF_UP))) {
kfree_skb(skb);
*skbp = NULL;
return false;
}
skb->dev = vlan_dev;
if (unlikely(skb->pkt_type == PACKET_OTHERHOST)) {
/* Our lower layer thinks this is not local, let's make sure.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment