Revert "geneve: make sure to pull inner header in geneve_rx()"
This reverts commit 59d2a40769
which is
commit 1ca1ba465e55b9460e4e75dec9fff31e708fec74 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: I2b2aff69a954b1ed5f1218aa043be79b1cac0bb0
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
ee2f1c68f1
commit
43bbe91c9f
@ -215,7 +215,7 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,
|
||||
struct metadata_dst *tun_dst = NULL;
|
||||
struct pcpu_sw_netstats *stats;
|
||||
unsigned int len;
|
||||
int nh, err = 0;
|
||||
int err = 0;
|
||||
void *oiph;
|
||||
|
||||
if (ip_tunnel_collect_metadata() || gs->collect_md) {
|
||||
@ -259,23 +259,9 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,
|
||||
goto drop;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
||||
oiph = skb_network_header(skb);
|
||||
skb_reset_network_header(skb);
|
||||
|
||||
if (!pskb_inet_may_pull(skb)) {
|
||||
DEV_STATS_INC(geneve->dev, rx_length_errors);
|
||||
DEV_STATS_INC(geneve->dev, rx_errors);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
/* Get the outer header. */
|
||||
oiph = skb->head + nh;
|
||||
|
||||
if (geneve_get_sk_family(gs) == AF_INET)
|
||||
err = IP_ECN_decapsulate(oiph, skb);
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
|
Loading…
Reference in New Issue
Block a user