Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0376599 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Revert "geneve: make sure to pull inner header in geneve_rx()"



This reverts commit e431c322 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: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 986aaf28
Loading
Loading
Loading
Loading
+2 −16
Original line number Diff line number Diff line
@@ -217,7 +217,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) {
@@ -261,23 +261,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)