<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/netgraph/ng_nat.c, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-08-26T04:34:45Z</updated>
<entry>
<title>ng_nat: fix potential crash when attaching to L2 directly</title>
<updated>2025-08-26T04:34:45Z</updated>
<author>
<name>Maxim Sobolev</name>
<email>sobomax@FreeBSD.org</email>
</author>
<published>2025-08-25T22:08:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f74c0dc583d69400b9cea41e2f009d8c4757ce26'/>
<id>urn:sha1:f74c0dc583d69400b9cea41e2f009d8c4757ce26</id>
<content type='text'>
Fix potential crash in the ng_nat module when attaching directly
to the layer 2 (ethernet) while calculating TCP checksum.

The issue is due to in_delayed_cksum() expecting to access IP
header at the offset 0 from the mbuf start, while if we are
attached to the L2 directly, the IP header at going to be at the
certain offset.

Reviewed by:	markj, tuexen
Approved by:	tuexen
Sponsored by:	Sippy Software, Inc.
Differential Revision:	https://reviews.freebsd.org/D49677
MFC After:	2 weeks
</content>
</entry>
<entry>
<title>netgraph: Enable support for EIM NAT</title>
<updated>2024-12-06T09:31:58Z</updated>
<author>
<name>Damjan Jovanovic</name>
<email>damjan.jov@gmail.com</email>
</author>
<published>2024-12-06T09:31:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f132be9bac5f29e844e8dde4f3a70f4c3c158221'/>
<id>urn:sha1:f132be9bac5f29e844e8dde4f3a70f4c3c158221</id>
<content type='text'>
Enable support for endpoint-independent mapping ("full cone NAT") via
Libalias's UDP NAT.

Reviewed by:    igoro, thj
Differential Revision:  https://reviews.freebsd.org/D46689
</content>
</entry>
<entry>
<title>netgraph: provide separate malloc type for nodes that are missing it</title>
<updated>2024-05-31T16:19:54Z</updated>
<author>
<name>Dmitry Lukhtionov</name>
<email>dmitryluhtionov@gmail.com</email>
</author>
<published>2024-05-31T16:19:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9b8db66402e94919ab47fc2d69863968e49e305a'/>
<id>urn:sha1:9b8db66402e94919ab47fc2d69863968e49e305a</id>
<content type='text'>
The kernel option NG_SEPARATE_MALLOC helps to debug memory leaks in
netgraph(4).  Several nodes were missing the support.
</content>
</entry>
<entry>
<title>netpfil: Use accessor functions and named constants for all tcphdr flags</title>
<updated>2023-12-25T12:18:01Z</updated>
<author>
<name>Richard Scheffenegger</name>
<email>rscheff@FreeBSD.org</email>
</author>
<published>2023-12-25T11:26:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a8b70cf26030d68631200619bd1b0ad35b34b6b8'/>
<id>urn:sha1:a8b70cf26030d68631200619bd1b0ad35b34b6b8</id>
<content type='text'>
Update all remaining references to the struct tcphdr th_x2 field.
This completes the compatibilty of various aspects with AccECN
(TH_AE), after the internal ipfw "re-checksum required" was moved
to use the TH_RES1 flag.

No functional change.

Reviewed By:           tuexen, #transport, glebius
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43172
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:11Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=95ee2897e98f5d444f26ed2334cc7c439f9c16c6'/>
<id>urn:sha1:95ee2897e98f5d444f26ed2334cc7c439f9c16c6</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-05-12T16:44:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4d846d260e2b9a3d4d0a701462568268cbfe7a5b'/>
<id>urn:sha1:4d846d260e2b9a3d4d0a701462568268cbfe7a5b</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>netgraph/ng_nat: Add RFC 6598/Carrier Grade NAT support</title>
<updated>2021-01-24T19:38:35Z</updated>
<author>
<name>Neel Chauhan</name>
<email>nc@FreeBSD.org</email>
</author>
<published>2021-01-24T19:23:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5fe433a6e4d8cab6b64284698301afc0c55a9db2'/>
<id>urn:sha1:5fe433a6e4d8cab6b64284698301afc0c55a9db2</id>
<content type='text'>
This extends upon the RFC 6598 support to libalias/ipfw in r357092.

Reviewed By:	manpages (bcr), donner, adrian, kp
Approved by:	kp (mentor)
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D23461
</content>
</entry>
<entry>
<title>net: clean up empty lines in .c and .h files</title>
<updated>2020-09-01T21:19:14Z</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2020-09-01T21:19:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=662c13053f4bf2d6245ba7e2b66c10d1cd5c1fb9'/>
<id>urn:sha1:662c13053f4bf2d6245ba7e2b66c10d1cd5c1fb9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ng_nat: avoid panic if attached directly to ng_ether and got short packet</title>
<updated>2020-02-12T00:31:00Z</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2020-02-12T00:31:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=49f384cb477bd32a4d1e85f0bf9fe7499f6b3e72'/>
<id>urn:sha1:49f384cb477bd32a4d1e85f0bf9fe7499f6b3e72</id>
<content type='text'>
From the beginning, ng_nat safely assumed cleansed traffic
because of limited ways it could be attached to NETGRAPH:
ng_ipfw or ng_ppp only.

Now as it may be attached with ng_ether too, the assumption proven wrong.
Add needed check to the ng_nat. Thanks for markj for debugging this.

PR:		243096
Submitted by:	Lutz Donnerhacke &lt;lutz@donnerhacke.de&gt;
Reported by:	Robert James Hernandez &lt;rob@sarcasticadmin.com&gt;
Reviewed by:	markj and others
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23091
</content>
</entry>
<entry>
<title>ng_nat: Pass IPv6 packets through.</title>
<updated>2020-01-23T16:45:48Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2020-01-23T16:45:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=66351f5126ac27d55d0014568ee9b5319e46c01b'/>
<id>urn:sha1:66351f5126ac27d55d0014568ee9b5319e46c01b</id>
<content type='text'>
ng_nat implements NAT for IPv4 traffic only.  When connected to an
ng_ether node it erroneously handled IPv6 packets as well.

This change is not sufficient: ng_nat does not do any validation of IP
packets in this mode, even though they have not yet passed through
ip_input().

PR:		243096
Reported by:	Robert James Hernandez &lt;rob@sarcasticadmin.com&gt;
Reviewed by:	julian
Differential Revision:	https://reviews.freebsd.org/D23080
</content>
</entry>
</feed>
