summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw/ipfw2.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2017-04-03 07:30:47 +0000
committerLuiz Souza <luiz@netgate.com>2017-07-15 11:14:54 -0500
commitc60851b98c5af5414d2d531586b9af15755469e3 (patch)
tree8277ebf6ab0def418ad3e3b4cca3f17b2b3b1063 /sbin/ipfw/ipfw2.c
parent847151a90c366430c1a9a2899ed1b4302ae5f613 (diff)
downloadFreeBSD-src-c60851b98c5af5414d2d531586b9af15755469e3.zip
FreeBSD-src-c60851b98c5af5414d2d531586b9af15755469e3.tar.gz
MFC r303012:
Add ipfw_nptv6 module that implements Network Prefix Translation for IPv6 as defined in RFC 6296. The module works together with ipfw(4) and implemented as its external action module. When it is loaded, it registers as eaction and can be used in rules. The usage pattern is similar to ipfw_nat(4). All matched by rule traffic goes to the NPT module. Reviewed by: hrs Obtained from: Yandex LLC Relnotes: yes Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D6420 MFC r304049: Add `stats reset` command implementation to NPTv6 module to be able reset statistics counters. Obtained from: Yandex LLC Sponsored by: Yandex LLC MFC r304076: Make statistics nat64lsn, nat64stl an nptv6 output netstat-like: "@value @description" and fix build due to -Wformat errors. MFC r314507: Fix NPTv6 rule counters when one_pass is not enabled. Consider the rule matching when both @done and @retval values returned from ipfw_run_eaction() are zero. And modify ipfw_nptv6() to return IP_FW_DENY and @done=0 when addresses do not match. Obtained from: Yandex LLC Sponsored by: Yandex LLC (cherry picked from commit f2b9d4d15428a360ba4692447f87aa3b7c7b4d83)
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r--sbin/ipfw/ipfw2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index faf7b97..0faff36 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -235,6 +235,7 @@ static struct _s_x ether_types[] = {
};
static struct _s_x rule_eactions[] = {
+ { "nptv6", TOK_NPTV6 },
{ NULL, 0 } /* terminator */
};
OpenPOWER on IntegriCloud