Mark Tomlinson 272502fcb7 gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY
When receiving an IPv4 packet inside an IPv6 GRE packet, and the
IP6_TNL_F_RCV_DSCP_COPY flag is set on the tunnel, the IPv4 header would
get corrupted. This is due to the common ip6_tnl_rcv() function assuming
that the inner header is always IPv6. This patch checks the tunnel
protocol for IPv4 inner packets, but still defaults to IPv6.

Fixes: 308edfdf1563 ("gre6: Cleanup GREv6 receive path, call common GRE functions")
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-08-20 16:28:04 -07:00
..
2020-08-15 08:34:36 -07:00
2020-06-23 20:27:09 -07:00
2019-09-26 08:56:17 +02:00
2020-07-13 17:20:40 -07:00
2020-08-15 08:26:55 -07:00
2020-07-13 17:20:40 -07:00
2020-08-18 15:58:53 -07:00
2020-08-11 10:20:34 -07:00
2020-08-10 19:07:44 -07:00