summaryrefslogtreecommitdiff
path: root/include/uapi/linux/virtio_config.h
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2015-11-11 23:25:44 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-14 21:40:58 -0800
commit377204f209fd51a24a359873ad44a97e4b5b72c8 (patch)
treea1ce497da95f9df5f6a6bcc726c6a1369691bfbb /include/uapi/linux/virtio_config.h
parent263c8f423ade0e7bd72ea82e36da3a458fac1e30 (diff)
packet: fix tpacket_snd max frame len
[ Upstream commit 5cfb4c8d05b4409c4044cb9c05b19705c1d9818b ] Since it's introduction in commit 69e3c75f4d54 ("net: TX_RING and packet mmap"), TX_RING could be used from SOCK_DGRAM and SOCK_RAW side. When used with SOCK_DGRAM only, the size_max > dev->mtu + reserve check should have reserve as 0, but currently, this is unconditionally set (in it's original form as dev->hard_header_len). I think this is not correct since tpacket_fill_skb() would then take dev->mtu and dev->hard_header_len into account for SOCK_DGRAM, the extra VLAN_HLEN could be possible in both cases. Presumably, the reserve code was copied from packet_snd(), but later on missed the check. Make it similar as we have it in packet_snd(). Fixes: 69e3c75f4d54 ("net: TX_RING and packet mmap") 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 'include/uapi/linux/virtio_config.h')
0 files changed, 0 insertions, 0 deletions