Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: sockopt: support IP_LOCAL_PORT_RANGE and IP_BIND_ADDRESS_NO_PORT
Support for IP_BIND_ADDRESS_NO_PORT sockopt was introduced in 90c337d ("inet: add IP_BIND_ADDRESS_NO_PORT to overcome bind(0) limitations"). Recently ca571e2 ("inet: move inet->bind_address_no_port to inet->inet_flags") allowed its value to be accessed without locking the socket. Support for (newer) IP_LOCAL_PORT_RANGE sockopt was introduced in 91d0b78 ("inet: Add IP_LOCAL_PORT_RANGE socket option"). In the same series a selftest was added in ae54396 ("selftests/net: Cover the IP_LOCAL_PORT_RANGE socket option"). This selftest also covers the IP_BIND_ADDRESS_NO_PORT sockopt. This patch enables getsockopt()/setsockopt() on MPTCP sockets for these socket options, syncing set values to subflows in sync_socket_options(). Ephemeral port range is synced to subflows, enabling NAT usecase described in 91d0b78. Signed-off-by: Maxim Galaganov <[email protected]>
- Loading branch information