Page MenuHomeFreeBSD

ipfw: fix checksum after NAT
ClosedPublic

Authored by timo.voelker_fh-muenster.de on May 19 2026, 12:55 PM.
Tags
None
Referenced Files
F161641101: D57091.diff
Sun, Jul 5, 12:45 PM
Unknown Object (File)
Sat, Jul 4, 1:55 AM
Unknown Object (File)
Sat, Jul 4, 1:55 AM
Unknown Object (File)
Wed, Jul 1, 2:44 AM
Unknown Object (File)
Wed, Jun 24, 9:44 PM
Unknown Object (File)
Mon, Jun 22, 11:09 PM
Unknown Object (File)
Wed, Jun 17, 10:57 AM
Unknown Object (File)
Sun, Jun 14, 12:55 PM

Details

Summary

When checksum offloading is used, IPFW needs to fix the checksum after libalias has done NAT. The ipfw_nat() function does so, but only for mbufs without a receiving interface. However, if, for example, the packet was sent inside a jail that used checksum offloading over an epair, ipfw still needs to fix the checksum even though the mbuf has set a receiving interface (epair).

This patch just removes the check whether a receiving interface is set.

It fixes a bug reported here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295057

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable