mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
udp: fix the proto value passed to ip_protocol_deliver_rcu for the segments
Guillaume noticed that: for segments udp_queue_rcv_one_skb() returns the
proto, and it should pass "ret" unmodified to ip_protocol_deliver_rcu().
Otherwize, with a negtive value passed, it will underflow inet_protos.
This can be reproduced with IPIP FOU:
# ip fou add port 5555 ipproto 4
# ethtool -K eth1 rx-gro-list on
Fixes: cf329aa42b
("udp: cope with UDP GRO packet misdirection")
Reported-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
61f54de2e9
commit
10c678bd0a
1 changed files with 1 additions and 1 deletions
|
@ -2173,7 +2173,7 @@ static int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
|
||||||
__skb_pull(skb, skb_transport_offset(skb));
|
__skb_pull(skb, skb_transport_offset(skb));
|
||||||
ret = udp_queue_rcv_one_skb(sk, skb);
|
ret = udp_queue_rcv_one_skb(sk, skb);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
ip_protocol_deliver_rcu(dev_net(skb->dev), skb, -ret);
|
ip_protocol_deliver_rcu(dev_net(skb->dev), skb, ret);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue