Linux: network: ip: socket option: IP_BIND_ADDRESS_NO_PORT

reference

https://www.man7.org/linux/man-pages/man7/ip.7.html

IP_BIND_ADDRESS_NO_PORT (since Linux 4.2)

Inform the kernel to not reserve an ephemeral port when using bind(2) with a port number of 0. The port will later be automatically chosen at connect(2) time, in a way that sharing allows a source port as long as the 4 -tuple is unique.
Because some information is not known during bind, such as the address and port of the other party, so the selection of the local source port is a problem, and it is also necessary to determine whether it can be reused. So it is recommended to turn this option on to use this new feature.

Introduction of this option:

commit 90c337da1524863838658078ec34241f45d8394d
Author: Eric Dumazet

Guess you like

Origin blog.csdn.net/qq_36428903/article/details/133075883