aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2022-08-20 20:33:39 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2022-08-20 20:39:12 +0000
commit8338690a0a43c8b11a382e2160f8eedb9aeecf91 (patch)
treea382a7c5428beab430fe93954e1d1d30c46a85fd
parentf829268bcc89bdede5e28044bfb6dc04fb0e9f8a (diff)
downloadsrc-8338690a0a43c8b11a382e2160f8eedb9aeecf91.tar.gz
src-8338690a0a43c8b11a382e2160f8eedb9aeecf91.zip
ip_reass: provide sysctl MIB returning IP fragment TTL
For now it is read-only, but eventually the cycle that goes over all fragments should be refactored and this MIB should also become read/write. This MIB will allow SNMP daemons to implement MIB-II ipReasmTimeout MIB straightfoward. Right now net-snmp compilation is broken by 1922eb3e9c2. The base system bsnmpd is not broken just because it ignored PR_SLOWTIMO, and thus always returned incorrectly doubled value for ipReasmTimeout.
-rw-r--r--sys/netinet/ip_reass.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c
index 0420091e0a2a..e581e2e622c7 100644
--- a/sys/netinet/ip_reass.c
+++ b/sys/netinet/ip_reass.c
@@ -167,6 +167,10 @@ SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragbucketsize,
sysctl_maxfragbucketsize, "I",
"Maximum number of IPv4 fragment reassembly queue entries per bucket");
+static u_int ipfragttl = IPFRAGTTL / 2;
+SYSCTL_UINT(_net_inet_ip, OID_AUTO, fragttl, CTLFLAG_RD, &ipfragttl,
+ IPFRAGTTL / 2, "IP fragment life time on reassembly queue");
+
/*
* Take incoming datagram fragment and try to reassemble it into
* whole datagram. If the argument is the first fragment or one