Re: [PATCH v2 net-next] inet: add IP_BIND_ADDRESS_NO_PORT to overcome bind(0) limitations

2015-06-07 Thread David Miller
From: Eric Dumazet eric.duma...@gmail.com Date: Sat, 06 Jun 2015 21:17:57 -0700 From: Eric Dumazet eduma...@google.com When an application needs to force a source IP on an active TCP socket it has to use bind(IP, port=x). As most applications do not want to deal with already used ports, x

[PATCH v2 net-next] inet: add IP_BIND_ADDRESS_NO_PORT to overcome bind(0) limitations

2015-06-06 Thread Eric Dumazet
From: Eric Dumazet eduma...@google.com When an application needs to force a source IP on an active TCP socket it has to use bind(IP, port=x). As most applications do not want to deal with already used ports, x is often set to 0, meaning the kernel is in charge to find an available port. But