Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Fix a documentation bug wrt. ip_unprivileged_port_start

It cannot overlap with the local port range - ie. with autobind selectable
ports - and not with reserved ports.

Indeed 'ip_local_reserved_ports' isn't even a range, it's a (by default
empty) set.

Fixes: 4548b683b781 ("Introduce a sysctl that modifies the value of PROT_SOCK.")
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Maciej Żenczykowski and committed by
David S. Miller
ac71676c fd567ac2

+5 -4
+5 -4
Documentation/networking/ip-sysctl.txt
··· 904 904 Defines the local port range that is used by TCP and UDP to 905 905 choose the local port. The first number is the first, the 906 906 second the last local port number. 907 - If possible, it is better these numbers have different parity. 908 - (one even and one odd values) 907 + If possible, it is better these numbers have different parity 908 + (one even and one odd value). 909 + Must be greater than or equal to ip_unprivileged_port_start. 909 910 The default values are 32768 and 60999 respectively. 910 911 911 912 ip_local_reserved_ports - list of comma separated ranges ··· 944 943 This is a per-namespace sysctl. It defines the first 945 944 unprivileged port in the network namespace. Privileged ports 946 945 require root or CAP_NET_BIND_SERVICE in order to bind to them. 947 - To disable all privileged ports, set this to 0. It may not 948 - overlap with the ip_local_reserved_ports range. 946 + To disable all privileged ports, set this to 0. They must not 947 + overlap with the ip_local_port_range. 949 948 950 949 Default: 1024 951 950