]> git.baikalelectronics.ru Git - kernel.git/commit
udp: fix the proto value passed to ip_protocol_deliver_rcu for the segments
authorXin Long <lucien.xin@gmail.com>
Mon, 7 Dec 2020 07:55:40 +0000 (15:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Dec 2020 08:32:11 +0000 (00:32 -0800)
commit88f2d3f1213cdac05ab7db3794fbd6608e9be7cf
tree455c2e9f949652022a931100901157104394e64e
parent26deb07a76e9f3c4fc6fdef3c617fef4fa966218
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: c1b82510d8bc ("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>
net/ipv4/udp.c