ng_nat: Pass IPv6 packets through.

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 <rob@sarcasticadmin.com>
Reviewed by:	julian
Differential Revision:	https://reviews.freebsd.org/D23080
This commit is contained in:
Mark Johnston 2020-01-23 16:45:48 +00:00
parent e6bd3a812d
commit 66351f5126
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357053
2 changed files with 1 additions and 2 deletions

View file

@ -35,7 +35,7 @@
.Sh DESCRIPTION
An
.Nm
node performs network address translation (NAT) of packets
node performs network address translation (NAT) of IPv4 packets
passing through it.
A
.Nm nat

View file

@ -795,7 +795,6 @@ ng_nat_rcvdata(hook_p hook, item_p item )
eh = mtod(m, struct ether_header *);
switch (ntohs(eh->ether_type)) {
case ETHERTYPE_IP:
case ETHERTYPE_IPV6:
ipofs = sizeof(struct ether_header);
break;
default: