datapath: backport: udp: prevent skbs lingering in tunnel socket queues
authorPravin B Shelar <pshelar@ovn.org>
Fri, 8 Jul 2016 23:36:14 +0000 (16:36 -0700)
committerPravin B Shelar <pshelar@ovn.org>
Sat, 9 Jul 2016 02:27:50 +0000 (19:27 -0700)
commit2b3397ebcda56f039714bfb6451b70e4407fe0ef
tree97bd217ec2888a41b1d51f0faa9b474fc019c9e0
parentcc3af88e1a7224421606090bda7ba560198f00a9
datapath: backport: udp: prevent skbs lingering in tunnel socket queues

Upstream commit:
    commit e5aed006be918af163eb397e45aa5ea6cefd5e01
    Author: Hannes Frederic Sowa <hannes@stressinduktion.org>

    udp: prevent skbs lingering in tunnel socket queues

    In case we find a socket with encapsulation enabled we should call
    the encap_recv function even if just a udp header without payload is
    available. The callbacks are responsible for correctly verifying and
    dropping the packets.

    Also, in case the header validation fails for geneve and vxlan we
    shouldn't put the skb back into the socket queue, no one will pick
    them up there.  Instead we can simply discard them in the respective
    encap_recv functions.

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
datapath/linux/compat/geneve.c
datapath/linux/compat/vxlan.c