Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2025 13:18:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 287229] IP reassembly issue in FreeBSD 14.1
Message-ID:  <bug-287229-7501-EuvRdrs44H@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-287229-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-287229-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D287229

Timo Voelker <timo.voelker@fh-muenster.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timo.voelker@fh-muenster.de

--- Comment #10 from Timo Voelker <timo.voelker@fh-muenster.de> ---
Hi Lucas,

In cooperation with Michael, I built a setup for your minimal testing tool.=
 I
executed a couple of runs and saw the same issue: the results of the runs
differ. It looks like the FreeBSD machine is running against an IP fragment
limit.

For IP reassembly, FreeBSD uses a hash table. For each hash value (bucket),=
 it
holds a list of reassembly entries. In each entry, it holds the fragments of
one packet until all data has arrived (and reassembly can be completed) or a
timeout (after 30s by default).

The number of list entries (net.inet.ip.maxfragbucketsize) seems relevant h=
ere.
Out of the box, your FreeBSD VM has set maxfragbucketsize=3D1. This means i=
f the
FreeBSD VM must insert a new entry (i.e., when the first fragment of a pack=
et
has been received) in a bucket that already contains an entry, it removes t=
his
one first. In consequence, FreeBSD is probably unable to reassemble that pa=
cket
with the removed fragments.

The value for maxfragbucketsize is set based on the available memory. Usual=
ly
on a 2 GB machine, like your FreeBSD VM, this value is set to 7, which seems
enough to not run into this issue. However, in /boot/loader.conf of your
FreeBSD VM, the size of the kernel memory is reduced:

vm.kmem_size=3D"200M"
vm.kmem_size_max=3D"200M"

After commenting out these two lines and a reboot, maxfragbucketsize is 7 a=
nd
the results of multiple runs are the same.

For the sake of completeness, these are other limits that might be relevant
here:

net.inet.ip.maxfragpackets=20
net.inet.ip.maxfrags

Timo

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-287229-7501-EuvRdrs44H>