Skip to content
Commit 2b05ad33 authored by Flavio Leitner's avatar Flavio Leitner Committed by David S. Miller
Browse files

tcp: bind() fix autoselection to share ports



The current code checks for conflicts when the application
requests a specific port.  If there is no conflict, then
the request is granted.

On the other hand, the port autoselection done by the kernel
fails when all ports are bound even when there is a port
with no conflict available.

The fix changes port autoselection to check if there is a
conflict and use it if not.

Signed-off-by: default avatarFlavio Leitner <fbl@redhat.com>
Signed-off-by: default avatarMarcelo Ricardo Leitner <mleitner@redhat.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 68315801
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment