diff options
author | ae <ae@FreeBSD.org> | 2017-04-03 07:30:47 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2017-04-03 07:30:47 +0000 |
commit | f2b9d4d15428a360ba4692447f87aa3b7c7b4d83 (patch) | |
tree | d7f7d2e6e8bfe558219f475ea846398176717c43 /sbin/ipfw/main.c | |
parent | 8f3f0abee7d29f21741ec48bf8c0646268c4d3aa (diff) | |
download | FreeBSD-src-f2b9d4d15428a360ba4692447f87aa3b7c7b4d83.zip FreeBSD-src-f2b9d4d15428a360ba4692447f87aa3b7c7b4d83.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
Diffstat (limited to 'sbin/ipfw/main.c')
-rw-r--r-- | sbin/ipfw/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ipfw/main.c b/sbin/ipfw/main.c index f25578f..cb4168f 100644 --- a/sbin/ipfw/main.c +++ b/sbin/ipfw/main.c @@ -425,6 +425,8 @@ ipfw_main(int oldac, char **oldav) if (co.use_set || try_next) { if (_substrcmp(*av, "delete") == 0) ipfw_delete(av); + else if (!strncmp(*av, "nptv6", strlen(*av))) + ipfw_nptv6_handler(ac, av); else if (_substrcmp(*av, "flush") == 0) ipfw_flush(co.do_force); else if (_substrcmp(*av, "zero") == 0) |