linux_dsm_epyc7002/drivers/net/xen-netback
Maxim Mikityanskiy d2aa125d62 net: Don't set transport offset to invalid value
If the socket was created with socket(AF_PACKET, SOCK_RAW, 0),
skb->protocol will be unset, __skb_flow_dissect() will fail, and
skb_probe_transport_header() will fall back to the offset_hint, making
the resulting skb_transport_offset incorrect.

If, however, there is no transport header in the packet,
transport_header shouldn't be set to an arbitrary value.

Fix it by leaving the transport offset unset if it couldn't be found, to
be explicit rather than to fill it with some wrong value. It changes the
behavior, but if some code relied on the old behavior, it would be
broken anyway, as the old one is incorrect.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-22 12:55:31 -08:00
..
common.h xen-netback: validate queue numbers in xenvif_set_hash_mapping() 2018-09-25 10:39:34 -07:00
hash.c xen-netback: handle page straddling in xenvif_set_hash_mapping() 2018-09-25 10:39:34 -07:00
interface.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-03 21:00:17 -07:00
Makefile xen-netback: separate guest side rx code into separate module 2016-10-06 20:37:35 -04:00
netback.c net: Don't set transport offset to invalid value 2019-02-22 12:55:31 -08:00
rx.c xen-netback: make function xenvif_rx_skb static 2018-02-26 11:36:54 -05:00
xenbus.c xen-netback: mark expected switch fall-through 2019-02-08 12:21:21 -08:00