]> git.baikalelectronics.ru Git - kernel.git/commit
ip_tunnel: allow to inherit from VLAN encapsulated IP
authorMatthias May <matthias.may@westermo.com>
Mon, 11 Jul 2022 09:17:19 +0000 (11:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Jul 2022 11:10:21 +0000 (12:10 +0100)
commite2bc48d1769f75838c8920101886fa6a7e7577fb
tree1706d749856e10b49a9924be85773a766cb86aa4
parent0d7eb8fa1023b49d1e7cd7b28181e8fb673ae5ef
ip_tunnel: allow to inherit from VLAN encapsulated IP

The current code allows to inherit the TOS, TTL, DF from the payload
when skb->protocol is ETH_P_IP or ETH_P_IPV6.
However when the payload is VLAN encapsulated (e.g because the tunnel
is of type GRETAP), then this inheriting does not work, because the
visible skb->protocol is of type ETH_P_8021Q or ETH_P_8021AD.

Instead of skb->protocol, use skb_protocol().

Signed-off-by: Matthias May <matthias.may@westermo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_tunnel.c