git: cf2ca148d9d6 - main - inet.4 icmp.4 udp.4: Add missing sysctls, other fixes

From: Mike Karels <karels_at_FreeBSD.org>
Date: Tue, 02 Aug 2022 14:51:11 UTC
The branch main has been updated by karels:

URL: https://cgit.FreeBSD.org/src/commit/?id=cf2ca148d9d6d5dc5983f1ce982d7f1872f10350

commit cf2ca148d9d6d5dc5983f1ce982d7f1872f10350
Author:     Mike Karels <karels@FreeBSD.org>
AuthorDate: 2022-07-21 13:17:03 +0000
Commit:     Mike Karels <karels@FreeBSD.org>
CommitDate: 2022-08-02 14:50:52 +0000

    inet.4 icmp.4 udp.4: Add missing sysctls, other fixes
    
    Add missing sysctls to inet.4 and icmp.4, using references to ip.4
    for variables and groups documented there.  Add sysctl.8 to "see also"
    and intro to variable section.  Rename "MIB Variables" section to
    "MIB (sysctl) Variables", as most people will associate with sysctl.
    Revise history: the ICMP implementation was in 4.2BSD.
    
    Reviewed by:    manpages(pauamma)
    Differential Revision: https://reviews.freebsd.org/D36003
---
 share/man/man4/icmp.4 | 20 +++++++++++++-------
 share/man/man4/inet.4 | 37 ++++++++++++++++++++++++++++++++++---
 share/man/man4/udp.4  |  7 ++++---
 3 files changed, 51 insertions(+), 13 deletions(-)

diff --git a/share/man/man4/icmp.4 b/share/man/man4/icmp.4
index 70a9562a442c..6836c614dfaf 100644
--- a/share/man/man4/icmp.4
+++ b/share/man/man4/icmp.4
@@ -28,7 +28,7 @@
 .\"     @(#)icmp.4	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd July 20, 2022
+.Dd August 1, 2022
 .Dt ICMP 4
 .Os
 .Sh NAME
@@ -153,14 +153,15 @@ The following codes are defined:
 .It 2 Ta auth-fail Ta photuris Ta "Authentication failed"
 .It 3 Ta decrypt-fail Ta photuris Ta "Decryption failed"
 .El
-.Ss MIB Variables
+.Ss MIB (sysctl) Variables
 The
 .Tn ICMP
 protocol implements a number of variables in the
 .Va net.inet.icmp
 branch of the
 .Xr sysctl 3
-MIB.
+MIB, which can also be read or modified with
+.Xr sysctl 8 .
 .Bl -tag -width ".Va icmplim_output"
 .It Va bmcastecho
 .Pq Vt boolean
@@ -200,9 +201,12 @@ Defaults to false.
 Number of bytes from original packet to quote in ICMP reply.
 This number is internally enforced to be at least 8 bytes (per RFC792)
 and at most the maximal space left in the ICMP reply mbuf.
+.It Va redirtimeout
+.Pq Vt integer
+Delay in seconds before expiring route created by ICMP redirect.
 .It Va reply_from_interface
 .Pq Vt boolean
-Use the IP address of the interface the packet came through in for
+Use the IP address of the interface the packet came in through for
 responses to packets which are not directly addressed to us.
 If enabled, this rule is processed before all others.
 By default, continue with normal source selection.
@@ -241,12 +245,14 @@ exists.
 .Sh SEE ALSO
 .Xr recv 2 ,
 .Xr send 2 ,
+.Xr sysctl 3 ,
 .Xr inet 4 ,
 .Xr intro 4 ,
 .Xr ip 4 ,
-.Xr pf.conf 5
+.Xr pf.conf 5 ,
+.Xr sysctl 8
 .Sh HISTORY
 The
 .Nm
-protocol appeared in
-.Bx 4.3 .
+protocol implementation appeared in
+.Bx 4.2 .
diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4
index c2b94ba3ecf6..31c80feecfaa 100644
--- a/share/man/man4/inet.4
+++ b/share/man/man4/inet.4
@@ -28,7 +28,7 @@
 .\"     From: @(#)inet.4	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd July 20, 2022
+.Dd August 1, 2022
 .Dt INET 4
 .Os
 .Sh NAME
@@ -157,7 +157,7 @@ preferred way is to use
 .Xr getifaddrs 3
 API.
 .El
-.Ss MIB Variables
+.Ss MIB (sysctl) Variables
 In addition to the variables supported by the transport protocols in
 .Va net.inet
 (for which the respective manual pages may be consulted),
@@ -165,7 +165,8 @@ there are a number of general variables implemented in the
 .Va net.inet.ip
 branch of the
 .Xr sysctl 3
-MIB.
+MIB, which can be also read or modified with
+.Xr sysctl 8 .
 The following general variables are defined:
 .Bl -tag -width ".Va accept_sourceroute"
 .It Va accept_sourceroute
@@ -176,9 +177,15 @@ and allow forwarding of packets with these addresses.
 .It Va allow_net240
 Boolean: allow experimental use of addresses in 240.0.0.0/4 as endpoints,
 and allow forwarding of packets with these addresses.
+.It Va curfrags
+Integer: Current number of IPv4 fragments across all reassembly queues
+in all VNETs (read-only).
 .It Va forwarding
 Boolean: enable/disable forwarding of IP packets.
 Defaults to off.
+.It Va fragpackets
+Integer: Current number of IPv4 fragment reassembly queue entries
+for the VNET (read-only).
 .It Va loopback_prefixlen
 Integer: prefix length of the address space reserved for loopback purposes.
 The default is 8, meaning that 127.0.0.0/8 is reserved for loopback,
@@ -216,6 +223,20 @@ Integer: maximum number of fragments the host will accept and hold
 in the reassembly queue for a packet.
 0 means that the host will not accept any fragmented packets for the VNET.
 This is a per-VNET limit.
+.It Va mcast
+Variables under the
+.Va net.inet.ip.mcast
+node are documented in
+.Xr ip 4 .
+.It Va no_same_prefix
+Boolean: Refuse to create same prefixes on different interfaces.
+This is a per-VNET value.
+.It Va portrange
+Variables under the
+.Va net.inet.ip.portrange
+node control port ranges used by transport protocols; see
+.Xr ip 4
+for details.
 .It Va process_options
 Integer: control IP options processing.
 By setting this variable to 0, all IP options in the incoming packets
@@ -248,6 +269,15 @@ At the same time, on high-speed links, it can decrease the ID reuse
 cycle greatly.
 Default is 0 (sequential IP IDs).
 IPv6 flow IDs and fragment IDs are always random.
+.It Va random_id_collisions
+Integer: count of IP ID collisions (read-only, per-VNET).
+.It Va random_id_period
+Integer: size of the IP ID array, which is the number of previous packets
+for which the IDs are recorded.
+The number must be between 512 and 32768 inclusive.
+This is a per-VNET value.
+.It Va random_id_total
+Integer: count of IP IDs created (read-only, per-VNET).
 .It Va redirect
 Boolean: enable/disable sending of ICMP redirects in response to
 .Tn IP
@@ -306,6 +336,7 @@ packets.
 .Xr route 4 ,
 .Xr tcp 4 ,
 .Xr udp 4 ,
+.Xr sysctl 8 ,
 .Xr pfil 9
 .Rs
 .%T "An Introductory 4.3 BSD Interprocess Communication Tutorial"
diff --git a/share/man/man4/udp.4 b/share/man/man4/udp.4
index 895cd1b01adf..7249e9db9c60 100644
--- a/share/man/man4/udp.4
+++ b/share/man/man4/udp.4
@@ -28,7 +28,7 @@
 .\"     @(#)udp.4	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd July 20, 2022
+.Dd August 1, 2022
 .Dt UDP 4
 .Os
 .Sh NAME
@@ -110,14 +110,15 @@ Only one value is supported for this option:
 .Tn UDP_ENCAP_ESPINUDP
 from RFC 3948, defined in
 .In netinet/udp.h .
-.Sh MIB VARIABLES
+.Sh MIB (sysctl) Variables
 The
 .Nm
 protocol implements a number of variables in the
 .Va net.inet.udp
 branch of the
 .Xr sysctl 3
-MIB:
+MIB, which can be also read or modified with
+.Xr sysctl 8 :
 .Bl -tag -width ".Va log_in_vain"
 .It Va blackhole
 When a datagram is received on a port where there is no socket