linux-stable/include
Tom Herbert 0643ee4fd1 inet: Fix get port to handle zero port number with soreuseport set
A user may call listen with binding an explicit port with the intent
that the kernel will assign an available port to the socket. In this
case inet_csk_get_port does a port scan. For such sockets, the user may
also set soreuseport with the intent a creating more sockets for the
port that is selected. The problem is that the initial socket being
opened could inadvertently choose an existing and unreleated port
number that was already created with soreuseport.

This patch adds a boolean parameter to inet_bind_conflict that indicates
rather soreuseport is allowed for the check (in addition to
sk->sk_reuseport). In calls to inet_bind_conflict from inet_csk_get_port
the argument is set to true if an explicit port is being looked up (snum
argument is nonzero), and is false if port scan is done.

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17 11:13:19 -05:00
..
acpi Merge branches 'acpica-fixes', 'acpi-cppc-fixes' and 'acpi-tools-fixes' 2016-11-18 21:34:42 +01:00
asm-generic Revert "default exported asm symbols to zero" 2016-12-07 08:39:00 -08:00
clocksource
crypto crypto: drbg - prevent invalid SG mappings 2016-11-30 19:46:44 +08:00
drm drm: Don't force all planes to be added to the state due to zpos 2016-10-26 18:48:05 +02:00
dt-bindings dt-bindings: net: add EEE capability constants 2016-11-29 19:38:31 -05:00
keys
kvm
linux net: macb: Added PCI wrapper for Platform Driver. 2016-12-17 10:24:33 -05:00
math-emu
media
memory
misc
net inet: Fix get port to handle zero port number with soreuseport set 2016-12-17 11:13:19 -05:00
pcmcia
ras
rdma
rxrpc
scsi
soc powerpc updates for 4.9 #2 2016-10-14 11:07:42 -07:00
sound
target target: Make EXTENDED_COPY 0xe4 failure return COPY TARGET DEVICE NOT REACHABLE 2016-10-19 21:22:32 -07:00
trace net/phy: add trace events for mdio accesses 2016-11-24 11:55:43 -05:00
uapi net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_* 2016-12-10 23:29:11 -05:00
video
xen
Kbuild