]> 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)
commit3c83df9ede5ae666e285b26f60c312e4ce7582a7
treee21b0278971b7764f40b74768cb51150c0d3b8c7
parenta5836113a68a3d0d1865b16fadd8c55caf4582a8
udp: fix bcast packet reception

The commit 2fc6a5e50fd7 ("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: 2fc6a5e50fd7 ("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