]> git.baikalelectronics.ru Git - kernel.git/commit
udp: fix bcast packet reception
authorPaolo Abeni <pabeni@redhat.com>
Mon, 9 Oct 2017 12:52:10 +0000 (14:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Oct 2017 17:28:25 +0000 (10:28 -0700)
commit8c95d94537f70c1e99d322b9edd751a270a695cf
treee21b0278971b7764f40b74768cb51150c0d3b8c7
parente088b65d39efb54478f4b24df0be81425e13cf1b
udp: fix bcast packet reception

The commit 41ed40bbeec2 ("udp: perform source validation for
mcast early demux") does not take into account that broadcast packets
lands in the same code path and they need different checks for the
source address - notably, zero source address are valid for bcast
and invalid for mcast.

As a result, 2nd and later broadcast packets with 0 source address
landing to the same socket are dropped. This breaks dhcp servers.

Since we don't have stringent performance requirements for ingress
broadcast traffic, fix it by disabling UDP early demux such traffic.

Reported-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Fixes: 41ed40bbeec2 ("udp: perform source validation for mcast early demux")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c