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)
Sat, Sep 19, 4:45 AM
Unknown Object (File)
Tue, Sep 15, 5:32 PM
Unknown Object (File)
Fri, Sep 11, 11:08 AM
Unknown Object (File)
Thu, Sep 10, 9:35 PM
Unknown Object (File)
Tue, Sep 8, 2:31 PM
Unknown Object (File)
Tue, Sep 8, 1:36 AM
Unknown Object (File)
Mon, Sep 7, 5:05 PM
Unknown Object (File)
Mon, Sep 7, 10:48 AM

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