Revert "net: ip_tunnel: make sure to pull inner header in ip_tunnel_rcv()"
This reverts commit 77fd5294ea
which is
commit b0ec2abf98267f14d032102551581c833b0659d3 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: I481b44d90e063818b1b6ed83ec319862c705531d
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -364,7 +364,7 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
|
|||||||
bool log_ecn_error)
|
bool log_ecn_error)
|
||||||
{
|
{
|
||||||
const struct iphdr *iph = ip_hdr(skb);
|
const struct iphdr *iph = ip_hdr(skb);
|
||||||
int nh, err;
|
int err;
|
||||||
|
|
||||||
#ifdef CONFIG_NET_IPGRE_BROADCAST
|
#ifdef CONFIG_NET_IPGRE_BROADCAST
|
||||||
if (ipv4_is_multicast(iph->daddr)) {
|
if (ipv4_is_multicast(iph->daddr)) {
|
||||||
@@ -390,21 +390,8 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
|
|||||||
tunnel->i_seqno = ntohl(tpi->seq) + 1;
|
tunnel->i_seqno = ntohl(tpi->seq) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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_set_network_header(skb, (tunnel->dev->type == ARPHRD_ETHER) ? ETH_HLEN : 0);
|
skb_set_network_header(skb, (tunnel->dev->type == ARPHRD_ETHER) ? ETH_HLEN : 0);
|
||||||
|
|
||||||
if (!pskb_inet_may_pull(skb)) {
|
|
||||||
DEV_STATS_INC(tunnel->dev, rx_length_errors);
|
|
||||||
DEV_STATS_INC(tunnel->dev, rx_errors);
|
|
||||||
goto drop;
|
|
||||||
}
|
|
||||||
iph = (struct iphdr *)(skb->head + nh);
|
|
||||||
|
|
||||||
err = IP_ECN_decapsulate(iph, skb);
|
err = IP_ECN_decapsulate(iph, skb);
|
||||||
if (unlikely(err)) {
|
if (unlikely(err)) {
|
||||||
if (log_ecn_error)
|
if (log_ecn_error)
|
||||||
|
Reference in New Issue
Block a user