Bug 293227 - VNET jail regression on 14-STABLE from 14.3 using bridge and epair
Summary: VNET jail regression on 14-STABLE from 14.3 using bridge and epair
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.3-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Timo Voelker
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-02-16 20:27 UTC by Tom Hukins
Modified: 2026-02-22 09:52 UTC (History)
9 users (show)

See Also:
tuexen: mfc-stable15+
tuexen: mfc-stable14+


Attachments
Shell script to demonstrate the networking regression (1.42 KB, application/x-shellscript)
2026-02-17 14:37 UTC, Tom Hukins
no flags Details
Packet capture from tcpdump against 14.3 (working) (46.36 KB, application/octet-stream)
2026-02-17 18:36 UTC, Tom Hukins
no flags Details
Packet capture from tcpdump against 14-STABLE (broken) (50.84 KB, application/octet-stream)
2026-02-17 18:37 UTC, Tom Hukins
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hukins 2026-02-16 20:27:02 UTC
I am running a recent 14-STABLE (14-n273651-d7207388cc58) and I see a network regression from 14.3-RELEASE running VNET jails using bridge(4) and epair(4).

The problem occurs when a client receives data from an IPv6 TCP server running in a VNET jail when the jail has a larger MTU than either the client or another device that packets route through.  I noticed this using a wg(4) tunnel with mtu 1420 between the client and server.

On 14.3-RELEASE, the jail receives an "ICMP6, packet too big" message which causes it to send smaller packets, but on 14-STABLE the jail repeatedly receives these ICMP messages but does not decrease the size of packets it sends.

I first noticed this problem running an nginx server in the jail and curl(1) on the client, but can also reproduce it running nc(1).

To reproduce the problem, create a VNET jail using bridge(4) in epair(4), with the bridge and jailed epair interface having IPv6 addresses within the same prefix.  The jail host needs the "net.inet6.ip6.forwarding" sysctl set.  The client needs to have a smaller mtu that the jail's bridge and epair interfaces, which default to 1500.

I notice that 503bf058cd0 was committed to STABLE-14 after 14.3 release to checksum offloading support for epair, but I don't know if this matters.

Please let me know if you would like me to run any specific diagnostic commands, test experimental code, or if you need more detail about what I observe.
Comment 1 Timo Voelker 2026-02-17 08:54:39 UTC
(In reply to Tom Hukins from comment #0)

My understanding of your problem is that a sender keeps sending packets that are too large and it seems to ignore the ICMP Packet Too Big messages. What I don't get is how your setup looks like. I tried to reproduce the problem with the following setup.

 Jail           Jail                 Jail             Jail
sender         router1              router2         receiver
epair0b --- epair0a epair1a --- epair1b epair2a --- epair2b
1::2/64     1::1/64 1:2::1/64  1:2::2/64 2::1/64    2::2/64
                    MTU 1400   MTU 1400

I configured sysctl net.inet6.ip6.forwarding=1 on router1 and router2.

With nc, I let the sender send a 200 KB file to 2::2. It starts sending 10 packets that are too large. router1 responds on each packet with a ICMP Packet Too Big message. The sender notices these messages and sens IP packets not larger than 1400 B from then on.

Looks all good to me. Can you give more details on how your test setup looks like?
Comment 2 Tom Hukins 2026-02-17 14:37:18 UTC
Created attachment 268135 [details]
Shell script to demonstrate the networking regression
Comment 3 Tom Hukins 2026-02-17 14:43:57 UTC
(In reply to Timo Voelker from comment #1)

Thank you for your quick investigation, Timo.

Your setup does not seem to involve a bridge interface or an interface with a lower MTU like my Wireguard interface.

I have simplified my setup to reproduce the problem and have written a shell script to reproduce it on 14-STABLE that works fine on 14.3-RELEASE.  I have attached the script to this ticket.

My setup is unusual in that ${if_standalone_epair_a} has a different MTU to ${if_standalone_epair_b}, but I imagine this roughly corresponds to the situation I saw with the Wireguard tunnel.

After running this script, run the setup commands shown, substituting CLIENT_JAIL_NAME and SERVER_JAIL_NAME for two jails you have already set up.

Within the server jail, I run:
  dd if=/dev/zero bs=18000 of=ZERO count=1
  nc -6 -l 9090 < ZERO

And within the client jail, I run:
  nc -6N 'fdcc:ac21:2e44:0::1' 9090 > OUT < /dev/null

On the most recent release the nc commands exit cleanly, but on -STABLE they hang.
Comment 4 Tom Hukins 2026-02-17 18:36:46 UTC
Created attachment 268137 [details]
Packet capture from tcpdump against 14.3 (working)

18:20:55.130196 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [S], seq 865658072, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 3510332589 ecr 0], length 0
18:20:55.130228 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [S.], seq 304728229, ack 865658073, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 565770738 ecr 3510332589], length 0
18:20:55.130267 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [.], ack 1, win 1035, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
18:20:55.130337 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [F.], seq 1, ack 1, win 1035, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
18:20:55.130345 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 0
18:20:55.130710 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130748 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130774 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 1429:2857, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130778 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 2857:4285, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130781 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 4285:5713, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130784 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 5713:7141, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130787 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 7141:8569, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130791 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 8569:9997, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130794 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 9997:11425, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130798 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 11425:12853, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130801 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 12853:14281, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1428
18:20:55.130810 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 1:1349, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130813 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 1349:2697, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130816 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 2697:4045, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130818 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 4045:5393, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130821 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 5393:6741, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130823 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 6741:8089, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130825 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 8089:9437, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130828 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 9437:10785, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130830 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 10785:12133, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130833 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 12133:13481, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.130836 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 13481:14281, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 800
18:20:55.130931 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130935 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130937 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130939 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130942 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130944 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130946 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130948 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130950 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:20:55.130994 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [.], ack 2697, win 993, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
18:20:55.130999 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [.], seq 14281:15629, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 1348
18:20:55.131001 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [.], ack 5393, win 951, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
18:20:55.131004 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [.], ack 8089, win 909, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
18:20:55.131005 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [.], ack 10785, win 867, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
18:20:55.131007 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [.], ack 13481, win 825, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
18:20:55.131018 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [.], ack 15629, win 792, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
18:20:55.131022 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [P.], seq 15629:16385, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 756
18:20:55.131119 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.54479: Flags [F.], seq 16385, ack 2, win 1035, options [nop,nop,TS val 565770738 ecr 3510332589], length 0
18:20:55.131150 IP6 fdcc:ac21:2e44:1::1.54479 > fdcc:ac21:2e44::1.9090: Flags [.], ack 16386, win 1035, options [nop,nop,TS val 3510332589 ecr 565770738], length 0
Comment 5 Tom Hukins 2026-02-17 18:37:46 UTC
Created attachment 268138 [details]
Packet capture from tcpdump against 14-STABLE (broken)

18:12:19.894007 IP6 fdcc:ac21:2e44:1::1.51747 > fdcc:ac21:2e44::1.9090: Flags [S], seq 4030456999, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 1548744928 ecr 0], length 0
18:12:19.894028 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [S.], seq 2997298949, ack 4030457000, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 3717466000 ecr 1548744928], length 0
18:12:19.894064 IP6 fdcc:ac21:2e44:1::1.51747 > fdcc:ac21:2e44::1.9090: Flags [.], ack 1, win 1035, options [nop,nop,TS val 1548744928 ecr 3717466000], length 0
18:12:19.894125 IP6 fdcc:ac21:2e44:1::1.51747 > fdcc:ac21:2e44::1.9090: Flags [F.], seq 1, ack 1, win 1035, options [nop,nop,TS val 1548744928 ecr 3717466000], length 0
18:12:19.894132 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 0
18:12:19.894460 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894500 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894511 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1429:2857, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894526 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894532 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 2857:4285, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894545 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894550 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 4285:5713, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894563 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894568 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 5713:7141, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894581 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894586 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 7141:8569, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894598 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894603 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 8569:9997, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894615 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894620 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 9997:11425, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894632 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894637 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 11425:12853, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894650 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:19.894655 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 12853:14281, ack 2, win 1035, options [nop,nop,TS val 3717466000 ecr 1548744928], length 1428
18:12:19.894668 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:20.139069 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717466245 ecr 1548744928], length 1428
18:12:20.139110 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:20.407869 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717466514 ecr 1548744928], length 1428
18:12:20.407931 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:20.724424 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717466830 ecr 1548744928], length 1428
18:12:20.724454 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:21.167421 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717467273 ecr 1548744928], length 1428
18:12:21.167473 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:21.855169 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717467961 ecr 1548744928], length 1428
18:12:21.855214 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:23.077401 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717469183 ecr 1548744928], length 1428
18:12:23.077450 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:24.874585 IP6 fdcc:ac21:2e44::1 > fdcc:ac21:2e44::: ICMP6, neighbor solicitation, who has fdcc:ac21:2e44::, length 32
18:12:24.874607 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, neighbor advertisement, tgt is fdcc:ac21:2e44::, length 24
18:12:24.874634 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, neighbor solicitation, who has fdcc:ac21:2e44::1, length 32
18:12:24.874639 IP6 fdcc:ac21:2e44::1 > fdcc:ac21:2e44::: ICMP6, neighbor advertisement, tgt is fdcc:ac21:2e44::1, length 24
18:12:25.262903 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717471369 ecr 1548744928], length 1428
18:12:25.262951 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
18:12:29.313322 IP6 fdcc:ac21:2e44::1.9090 > fdcc:ac21:2e44:1::1.51747: Flags [.], seq 1:1429, ack 2, win 1035, options [nop,nop,TS val 3717475419 ecr 1548744928], length 1428
18:12:29.313376 IP6 fdcc:ac21:2e44:: > fdcc:ac21:2e44::1: ICMP6, packet too big, mtu 1420, length 1240
Comment 6 Timo Voelker 2026-02-17 21:39:45 UTC
Thanks for the script. I was able to reproduce the problem. Here is my test setup.

 Jail              Jail
sender           receiver
epair0b           epair1b
1::2/64           2::2/64
   \               /
    \             /
     \    Host   /
  epair0a        |
     |        epair1a
   bridge0    2::1/64
   1::1/64    MTU 1420
sysctl net.inet6.ip6.forwarding=1

If I let the sender send a file to 2::2, it sends packets that are too large, and the Host responds with a Packet Too Big message, which the sender ignores.

The sender ignores the Packet Too Big messages, because the ICMP checksum is incorrect. The issue seems to be related to transmission checksum offloading and to the bridge. If I disable the transmission checksum on epair0b with

jexec sender ifconfig epair0b -txcsum6

or if I destroy bridge0 (and configure the IP on epair0a), the issue disappears.

This is how far I've gotten by now.
Comment 7 Timo Voelker 2026-02-19 12:34:13 UTC
I found the cause for this issue.

When the sender in the jail sends a TCP packet, it uses checksum offloading because, since 503bf058cd0, epair offers checksum offloading. Thus, it skips computing the checksum and just sets a bit on the mbuf for the packet indicating that the TCP checksum still has to be computed.

The host drops the packet and responds with an ICMPv6 Packet Too Big message if it is too large. When doing that, it reuses the mbuf of the packet that triggered the ICMPv6 message. It basically prepends an IPv6 and ICMPv6 header and leaves the checksum offloading bit set. When sending this over the bridge back to the sender, the host notices that the bridge does not support checksum offloading. Due to the checksum offloading bit, the host assumes a TCP packet and computes and inserts the TCP checksum somewhere in the ICMP packet. This changes the ICMP packet, which makes the ICMP checksum incorrect.

I created a patch that resets the checksum offloading bits in this case.

https://reviews.freebsd.org/D55367
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-02-19 14:22:12 UTC
A commit in branch main references this bug:

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

commit ada4dc77577f7162353e8c2916ba5c258b6210f0
Author:     Timo Völker <timo.voelker@fh-muenster.de>
AuthorDate: 2026-02-19 14:15:10 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-02-19 14:21:01 +0000

    icmp6: clear csum_flags on mbuf reuse

    When icmp6 sends an ICMPv6 message, it reuses the mbuf of the packet
    that triggered the ICMPv6 message and prepends an IPv6 and ICMPv6
    header. For a locally generated packet with checksum offloading, the
    mbuf still has csum_flags set indicating that a SCTP/TCP/UDP checksum
    has to be computed and inserted. Since this not the case anymore,
    csum_flags need to be cleared.

    PR:                     293227
    Reviewed by:            kp, zlei, tuexen
    MFC after:              3 days
    Differential Revision:  https://reviews.freebsd.org/D55367

 sys/netinet6/icmp6.c | 1 +
 1 file changed, 1 insertion(+)
Comment 9 commit-hook freebsd_committer freebsd_triage 2026-02-19 18:58:46 UTC
A commit in branch stable/14 references this bug:

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

commit 0a87ae18331d5c52dde1e5a4f13ee577e8e5e188
Author:     Timo Völker <timo.voelker@fh-muenster.de>
AuthorDate: 2026-02-19 14:15:10 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-02-19 17:42:05 +0000

    icmp6: clear csum_flags on mbuf reuse

    When icmp6 sends an ICMPv6 message, it reuses the mbuf of the packet
    that triggered the ICMPv6 message and prepends an IPv6 and ICMPv6
    header. For a locally generated packet with checksum offloading, the
    mbuf still has csum_flags set indicating that a SCTP/TCP/UDP checksum
    has to be computed and inserted. Since this not the case anymore,
    csum_flags need to be cleared.

    PR:                     293227
    Reviewed by:            kp, zlei, tuexen
    MFC after:              3 days
    Differential Revision:  https://reviews.freebsd.org/D55367

    (cherry picked from commit ada4dc77577f7162353e8c2916ba5c258b6210f0)

 sys/netinet6/icmp6.c | 1 +
 1 file changed, 1 insertion(+)
Comment 10 commit-hook freebsd_committer freebsd_triage 2026-02-19 19:28:53 UTC
A commit in branch releng/14.4 references this bug:

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

commit 28b5b653a5672104d5c376a2d36fc4282e6bc062
Author:     Timo Völker <timo.voelker@fh-muenster.de>
AuthorDate: 2026-02-19 14:15:10 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-02-19 19:21:55 +0000

    icmp6: clear csum_flags on mbuf reuse

    When icmp6 sends an ICMPv6 message, it reuses the mbuf of the packet
    that triggered the ICMPv6 message and prepends an IPv6 and ICMPv6
    header. For a locally generated packet with checksum offloading, the
    mbuf still has csum_flags set indicating that a SCTP/TCP/UDP checksum
    has to be computed and inserted. Since this not the case anymore,
    csum_flags need to be cleared.

    PR:                     293227
    Reviewed by:            kp, zlei, tuexen
    MFC after:              3 days
    Differential Revision:  https://reviews.freebsd.org/D55367

    (cherry picked from commit ada4dc77577f7162353e8c2916ba5c258b6210f0)
    (cherry picked from commit 0a87ae18331d5c52dde1e5a4f13ee577e8e5e188)

 sys/netinet6/icmp6.c | 1 +
 1 file changed, 1 insertion(+)
Comment 11 Tom Hukins 2026-02-21 13:04:39 UTC
Timo, thank you for your work fixing this problem.

I have installed a recent 14-STABLE including your patch and it fixes the problem I saw.

I notice that the main, stable/14, and releng/14.4 all have this patch applied, but stable/15 does not yet.
Comment 12 commit-hook freebsd_committer freebsd_triage 2026-02-22 09:48:00 UTC
A commit in branch stable/15 references this bug:

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

commit ea75f726c432586632818bbcd84397ed126fd0a1
Author:     Timo Völker <timo.voelker@fh-muenster.de>
AuthorDate: 2026-02-19 14:15:10 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-02-22 09:47:12 +0000

    icmp6: clear csum_flags on mbuf reuse

    When icmp6 sends an ICMPv6 message, it reuses the mbuf of the packet
    that triggered the ICMPv6 message and prepends an IPv6 and ICMPv6
    header. For a locally generated packet with checksum offloading, the
    mbuf still has csum_flags set indicating that a SCTP/TCP/UDP checksum
    has to be computed and inserted. Since this not the case anymore,
    csum_flags need to be cleared.

    PR:                     293227
    Reviewed by:            kp, zlei, tuexen
    Differential Revision:  https://reviews.freebsd.org/D55367

    (cherry picked from commit ada4dc77577f7162353e8c2916ba5c258b6210f0)

 sys/netinet6/icmp6.c | 1 +
 1 file changed, 1 insertion(+)
Comment 13 Michael Tuexen freebsd_committer freebsd_triage 2026-02-22 09:52:13 UTC
(In reply to Tom Hukins from comment #11)
Fixes get in the main branch first and then are MFC to stable/14 and stable/15. The common rule is to wait at least for three days before doing the MFC. Due to the release process of 14.4, I MFCed the patch to stable/14 earlier after consulting with the release engineering team. They then MFCed the change from stable/14 to releng/14.4.
I just MFCed the fix to stable/15.

Thanks for testing the fix and reporting that it solves your problem.