Commit c85636a
mptcp: sockopt: support IP_LOCAL_PORT_RANGE and IP_BIND_ADDRESS_NO_PORT
Support for IP_BIND_ADDRESS_NO_PORT sockopt was introduced in [1].
Recently [2] allowed its value to be accessed without locking the
socket.
Support for (newer) IP_LOCAL_PORT_RANGE sockopt was introduced in [3].
In the same series a selftest was added in [4]. 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 [3].
[1] commit 90c337d ("inet: add IP_BIND_ADDRESS_NO_PORT to overcome
bind(0) limitations")
[2] commit ca571e2 ("inet: move inet->bind_address_no_port to
inet->inet_flags")
[3] commit 91d0b78 ("inet: Add IP_LOCAL_PORT_RANGE socket option")
[4] commit ae54396 ("selftests/net: Cover the IP_LOCAL_PORT_RANGE
socket option")
Signed-off-by: Maxim Galaganov <max@internet.ru>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 57d3117 commit c85636a
1 file changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
| 444 | + | |
443 | 445 | | |
444 | 446 | | |
445 | 447 | | |
| |||
455 | 457 | | |
456 | 458 | | |
457 | 459 | | |
458 | | - | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| |||
710 | 711 | | |
711 | 712 | | |
712 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
713 | 722 | | |
714 | 723 | | |
715 | 724 | | |
| |||
755 | 764 | | |
756 | 765 | | |
757 | 766 | | |
| 767 | + | |
| 768 | + | |
758 | 769 | | |
759 | 770 | | |
760 | 771 | | |
| |||
1350 | 1361 | | |
1351 | 1362 | | |
1352 | 1363 | | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
1353 | 1370 | | |
1354 | 1371 | | |
1355 | 1372 | | |
| |||
1450 | 1467 | | |
1451 | 1468 | | |
1452 | 1469 | | |
| 1470 | + | |
| 1471 | + | |
1453 | 1472 | | |
1454 | 1473 | | |
1455 | 1474 | | |
| |||
0 commit comments