af_packet: fix for sending VLAN frames via packet_mmap
authorPhil Sutter <phil@nwl.cc>
Fri, 2 Aug 2013 09:37:40 +0000 (11:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Aug 2013 21:58:32 +0000 (14:58 -0700)
commitcbd89acb9eb257ed3b2be867142583fdcf7fdc5b
tree7dfaa72d8f217853bb840407a86a9d6b46146525
parent0f75b09c798ed00c30d7d5551b896be883bc2aeb
af_packet: fix for sending VLAN frames via packet_mmap

Since tpacket_fill_skb() parses the protocol field in ethernet frames'
headers, it's easy to see if any passed frame is a VLAN one and account
for the extended size.

But as the real protocol does not turn up before tpacket_fill_skb()
runs which in turn also checks the frame length, move the max frame
length calculation into the function.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c