diff options
| author | Daniel Borkmann <daniel@iogearbox.net> | 2015-11-11 23:25:42 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-14 21:40:58 -0800 |
| commit | bbf14f8bb1041b5c11b9ccf998a075a03f04de3d (patch) | |
| tree | 5821802c8512106da4568c978a802c150abd2be0 /drivers/gpu/drm/virtio/virtgpu_object.c | |
| parent | 6b4a14f4265267d8d1ff6b2465e0be19da0c256a (diff) | |
packet: only allow extra vlan len on ethernet devices
[ Upstream commit 3c70c132488794e2489ab045559b0ce0afcf17de ]
Packet sockets can be used by various net devices and are not
really restricted to ARPHRD_ETHER device types. However, when
currently checking for the extra 4 bytes that can be transmitted
in VLAN case, our assumption is that we generally probe on
ARPHRD_ETHER devices. Therefore, before looking into Ethernet
header, check the device type first.
This also fixes the issue where non-ARPHRD_ETHER devices could
have no dev->hard_header_len in TX_RING SOCK_RAW case, and thus
the check would test unfilled linear part of the skb (instead
of non-linear).
Fixes: 57f89bfa2140 ("network: Allow af_packet to transmit +4 bytes for VLAN packets.")
Fixes: 52f1454f629f ("packet: allow to transmit +4 byte in TX_RING slot for VLAN case")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_object.c')
0 files changed, 0 insertions, 0 deletions
