]> git.baikalelectronics.ru Git - kernel.git/commit
udp6: add missing checks on edumux packet processing
authorPaolo Abeni <pabeni@redhat.com>
Thu, 13 Sep 2018 14:27:21 +0000 (16:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Sep 2018 22:27:44 +0000 (15:27 -0700)
commit95c71865c8446cf1e04073312315447ee69c51ce
tree616d95391b21e18b429258bf0a937e00c59e435f
parent8194418e2c751a53562b3b1cc760e5c9f015e8b4
udp6: add missing checks on edumux packet processing

Currently the UDPv6 early demux rx code path lacks some mandatory
checks, already implemented into the normal RX code path - namely
the checksum conversion and no_check6_rx check.

Similar to the previous commit, we move the common processing to
an UDPv6 specific helper and call it from both edemux code path
and normal code path. In respect to the UDPv4, we need to add an
explicit check for non zero csum according to no_check6_rx value.

Reported-by: Jianlin Shi <jishi@redhat.com>
Suggested-by: Xin Long <lucien.xin@gmail.com>
Fixes: f68a3ed2d7d7 ("udp6: fix socket leak on early demux")
Fixes: f331369404b4 ("udp: Add support for doing checksum unnecessary conversion")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/udp.c