summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-11-17 20:42:08 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-11-17 20:42:08 +0000
commit39392ad0eaee8f7f33337bc8d2e2d20fde3fbcb2 (patch)
tree20d2b0ccf315af875bb5b146a16fc6eec06306de /sys/netpfil
parentf7cc799685317425409dd3ea72cbdd56fdb295c9 (diff)
downloadFreeBSD-src-39392ad0eaee8f7f33337bc8d2e2d20fde3fbcb2.zip
FreeBSD-src-39392ad0eaee8f7f33337bc8d2e2d20fde3fbcb2.tar.gz
Fix dynamic IPv6 rules showing junk for non-specified address masks.
For example: 00002 0 0 (19s) PARENT 1 tcp 10.10.0.5 0 <-> 0.0.0.0 0 00002 4 412 (1s) LIMIT tcp 10.10.0.5 25848 <-> 10.10.0.7 22 00002 10 777 (1s) LIMIT tcp 2001:894:5a24:653::503:1 52023 <-> 2001:894:5a24:653:ca0a:a9ff:fe04:3978 22 00002 0 0 (17s) PARENT 1 tcp 2001:894:5a24:653::503:1 0 <-> 80f3:70d:23fe:ffff:1005:: 0 Fix this by zeroing the unused address, as is done for IPv4: 00002 0 0 (18s) PARENT 1 tcp 10.10.0.5 0 <-> 0.0.0.0 0 00002 36 14952 (1s) LIMIT tcp 10.10.0.5 25848 <-> 10.10.0.7 22 00002 0 0 (0s) PARENT 1 tcp 2001:894:5a24:653::503:1 0 <-> :: 0 00002 4 345 (274s) LIMIT tcp 2001:894:5a24:653::503:1 34131 <-> 2001:470:1f11:262:ca0a:a9ff:fe04:3978 22 MFC after: 2 weeks
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/ipfw/ip_fw_dynamic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c
index 083244d..9db59a2 100644
--- a/sys/netpfil/ipfw/ip_fw_dynamic.c
+++ b/sys/netpfil/ipfw/ip_fw_dynamic.c
@@ -735,6 +735,9 @@ ipfw_install_state(struct ip_fw_chain *chain, struct ip_fw *rule,
id.fib = M_GETFIB(args->m);
if (IS_IP6_FLOW_ID (&(args->f_id))) {
+ bzero(&id.src_ip6, sizeof(id.src_ip6));
+ bzero(&id.dst_ip6, sizeof(id.dst_ip6));
+
if (limit_mask & DYN_SRC_ADDR)
id.src_ip6 = args->f_id.src_ip6;
if (limit_mask & DYN_DST_ADDR)
OpenPOWER on IntegriCloud