diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2024-04-10 07:16:40 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2024-04-21 12:29:59 +0000 |
commit | 354be74b7ea99cf62d8fc87fbc18f9caa4ccbab1 (patch) | |
tree | c747709ce338c88ed82ee4155f56c59227b90088 | |
parent | 46028d3cad00624fe41e313b5fd2231243e16df4 (diff) | |
download | common-354be74b7ea99cf62d8fc87fbc18f9caa4ccbab1.tar.gz |
Revert "ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv()"
This reverts commit a9bc32879a08f23cdb80a48c738017e39aea1080 which is
commit 8d975c15c0cd744000ca386247432d57b21f9df0 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Ia92fc478b9ac9162d29900ba8b944c3c0fa42576
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index d1f819238414..9b8b209b780a 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -829,8 +829,8 @@ static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, struct sk_buff *skb), bool log_ecn_err) { - const struct ipv6hdr *ipv6h; - int nh, err; + const struct ipv6hdr *ipv6h = ipv6_hdr(skb); + int err; if ((!(tpi->flags & TUNNEL_CSUM) && (tunnel->parms.i_flags & TUNNEL_CSUM)) || @@ -862,29 +862,14 @@ static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, goto drop; } + ipv6h = ipv6_hdr(skb); skb->protocol = eth_type_trans(skb, tunnel->dev); skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN); } else { skb->dev = tunnel->dev; } - /* Save offset of outer header relative to skb->head, - * because we are going to reset the network header to the inner header - * and might change skb->head. - */ - nh = skb_network_header(skb) - skb->head; - skb_reset_network_header(skb); - - if (!pskb_inet_may_pull(skb)) { - DEV_STATS_INC(tunnel->dev, rx_length_errors); - DEV_STATS_INC(tunnel->dev, rx_errors); - goto drop; - } - - /* Get the outer header. */ - ipv6h = (struct ipv6hdr *)(skb->head + nh); - memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); |