Commit c02bd115 authored by Jakub Kicinski's avatar Jakub Kicinski

Revert "geneve: pull IP header before ECN decapsulation"

This reverts commit 4179b00c ("geneve: pull IP header before ECN decapsulation").

Eric says: "network header should have been pulled already before
hitting geneve_rx()". Let's revert the syzbot fix since it's causing
more harm than good, and revisit.
Suggested-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarJianlin Shi <jishi@redhat.com>
Fixes: 4179b00c ("geneve: pull IP header before ECN decapsulation")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=210569
Link: https://lore.kernel.org/netdev/CANn89iJVWfb=2i7oU1=D55rOyQnBbbikf+Mc6XHMkY7YX-yGEw@mail.gmail.com/Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 323a391a
......@@ -257,21 +257,11 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,
skb_dst_set(skb, &tun_dst->dst);
/* Ignore packet loops (and multicast echo) */
if (ether_addr_equal(eth_hdr(skb)->h_source, geneve->dev->dev_addr))
goto rx_error;
switch (skb_protocol(skb, true)) {
case htons(ETH_P_IP):
if (pskb_may_pull(skb, sizeof(struct iphdr)))
goto rx_error;
break;
case htons(ETH_P_IPV6):
if (pskb_may_pull(skb, sizeof(struct ipv6hdr)))
goto rx_error;
break;
default:
goto rx_error;
if (ether_addr_equal(eth_hdr(skb)->h_source, geneve->dev->dev_addr)) {
geneve->dev->stats.rx_errors++;
goto drop;
}
oiph = skb_network_header(skb);
skb_reset_network_header(skb);
......@@ -308,8 +298,6 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,
dev_sw_netstats_rx_add(geneve->dev, len);
return;
rx_error:
geneve->dev->stats.rx_errors++;
drop:
/* Consume bad packet */
kfree_skb(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment