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
Unknown Object (File)
Wed, Aug 19, 4:38 PM
Unknown Object (File)
Wed, Aug 12, 6:57 PM
Unknown Object (File)
Tue, Aug 11, 11:18 PM
Unknown Object (File)
Sun, Aug 9, 6:33 PM
Unknown Object (File)
Sun, Aug 9, 2:58 PM
Unknown Object (File)
Sat, Aug 8, 4:58 PM
Unknown Object (File)
Sat, Aug 8, 11:28 AM
Unknown Object (File)
Fri, Aug 7, 7:23 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