summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/test
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>2005-12-30 11:34:54 +0000
committerguido <guido@FreeBSD.org>2005-12-30 11:34:54 +0000
commit9749beb9e35afd40d054e5592764d50ed069a890 (patch)
tree92e5e7f4a485051a94f584190e946730b901c425 /contrib/ipfilter/test
parentb8892e0b0c21a7cf39b7b7abaaa0f1a85028288f (diff)
downloadFreeBSD-src-9749beb9e35afd40d054e5592764d50ed069a890.zip
FreeBSD-src-9749beb9e35afd40d054e5592764d50ed069a890.tar.gz
Import IP Filter 4.1.10
Diffstat (limited to 'contrib/ipfilter/test')
-rw-r--r--contrib/ipfilter/test/Makefile23
-rw-r--r--contrib/ipfilter/test/dotest20
-rw-r--r--contrib/ipfilter/test/expected/bpf18
-rw-r--r--contrib/ipfilter/test/expected/f1378
-rw-r--r--contrib/ipfilter/test/expected/f171
-rw-r--r--contrib/ipfilter/test/expected/f185
-rw-r--r--contrib/ipfilter/test/expected/f1910
-rw-r--r--contrib/ipfilter/test/expected/f784
-rw-r--r--contrib/ipfilter/test/expected/f954
-rw-r--r--contrib/ipfilter/test/expected/i12
-rw-r--r--contrib/ipfilter/test/expected/i114
-rw-r--r--contrib/ipfilter/test/expected/i1221
-rw-r--r--contrib/ipfilter/test/expected/i142
-rw-r--r--contrib/ipfilter/test/expected/i163
-rw-r--r--contrib/ipfilter/test/expected/i1710
-rw-r--r--contrib/ipfilter/test/expected/i1810
-rw-r--r--contrib/ipfilter/test/expected/i1922
-rw-r--r--contrib/ipfilter/test/expected/i21
-rw-r--r--contrib/ipfilter/test/expected/i204
-rw-r--r--contrib/ipfilter/test/expected/i2110
-rw-r--r--contrib/ipfilter/test/expected/i41
-rw-r--r--contrib/ipfilter/test/expected/i62
-rw-r--r--contrib/ipfilter/test/expected/i75
-rw-r--r--contrib/ipfilter/test/expected/i831
-rw-r--r--contrib/ipfilter/test/expected/i95
-rw-r--r--contrib/ipfilter/test/expected/in13
-rw-r--r--contrib/ipfilter/test/expected/in26
-rw-r--r--contrib/ipfilter/test/expected/in51
-rw-r--r--contrib/ipfilter/test/expected/in64
-rw-r--r--contrib/ipfilter/test/expected/n1204
-rw-r--r--contrib/ipfilter/test/expected/n1196
-rw-r--r--contrib/ipfilter/test/expected/n135
-rw-r--r--contrib/ipfilter/test/expected/n145
-rw-r--r--contrib/ipfilter/test/expected/n2152
-rw-r--r--contrib/ipfilter/test/expected/n320
-rw-r--r--contrib/ipfilter/test/expected/n4120
-rw-r--r--contrib/ipfilter/test/expected/n5648
-rw-r--r--contrib/ipfilter/test/expected/n6130
-rw-r--r--contrib/ipfilter/test/expected/n754
-rw-r--r--contrib/ipfilter/test/expected/p12
-rw-r--r--contrib/ipfilter/test/expected/p27
-rw-r--r--contrib/ipfilter/test/expected/p32
-rw-r--r--contrib/ipfilter/test/input/f1351
-rw-r--r--contrib/ipfilter/test/input/f1715
-rw-r--r--contrib/ipfilter/test/input/f184
-rw-r--r--contrib/ipfilter/test/input/f194
-rw-r--r--contrib/ipfilter/test/input/f76
-rw-r--r--contrib/ipfilter/test/input/f93
-rw-r--r--contrib/ipfilter/test/input/n134
-rw-r--r--contrib/ipfilter/test/input/n144
-rw-r--r--contrib/ipfilter/test/input/ni176
-rw-r--r--contrib/ipfilter/test/itest9
-rwxr-xr-xcontrib/ipfilter/test/natipftest4
-rw-r--r--contrib/ipfilter/test/regress/bpf14
-rw-r--r--contrib/ipfilter/test/regress/f132
-rw-r--r--contrib/ipfilter/test/regress/f184
-rw-r--r--contrib/ipfilter/test/regress/f192
-rw-r--r--contrib/ipfilter/test/regress/f73
-rw-r--r--contrib/ipfilter/test/regress/i12
-rw-r--r--contrib/ipfilter/test/regress/i114
-rw-r--r--contrib/ipfilter/test/regress/i123
-rw-r--r--contrib/ipfilter/test/regress/i142
-rw-r--r--contrib/ipfilter/test/regress/i163
-rw-r--r--contrib/ipfilter/test/regress/i1711
-rw-r--r--contrib/ipfilter/test/regress/i182
-rw-r--r--contrib/ipfilter/test/regress/i1922
-rw-r--r--contrib/ipfilter/test/regress/i21
-rw-r--r--contrib/ipfilter/test/regress/i204
-rw-r--r--contrib/ipfilter/test/regress/i216
-rw-r--r--contrib/ipfilter/test/regress/i41
-rw-r--r--contrib/ipfilter/test/regress/i62
-rw-r--r--contrib/ipfilter/test/regress/i75
-rw-r--r--contrib/ipfilter/test/regress/i829
-rw-r--r--contrib/ipfilter/test/regress/i97
-rw-r--r--contrib/ipfilter/test/regress/in17
-rw-r--r--contrib/ipfilter/test/regress/in26
-rw-r--r--contrib/ipfilter/test/regress/in511
-rw-r--r--contrib/ipfilter/test/regress/in64
-rw-r--r--contrib/ipfilter/test/regress/n131
-rw-r--r--contrib/ipfilter/test/regress/n141
-rw-r--r--contrib/ipfilter/test/regress/ni17.nat4
-rw-r--r--contrib/ipfilter/test/regress/p2.ipf1
-rw-r--r--contrib/ipfilter/test/test.format42
-rwxr-xr-xcontrib/ipfilter/test/vfycksum.pl11
84 files changed, 1407 insertions, 785 deletions
diff --git a/contrib/ipfilter/test/Makefile b/contrib/ipfilter/test/Makefile
index 7f17241..16535bf 100644
--- a/contrib/ipfilter/test/Makefile
+++ b/contrib/ipfilter/test/Makefile
@@ -11,7 +11,7 @@ all: results tests
results:
mkdir -p results
-tests: ipf nat logtests ipv6 pools
+tests: ipf nat logtests ipv6 pools bpf
ipf: ftests ptests
@@ -21,12 +21,13 @@ first:
-mkdir -p results
# Filtering tests
-ftests: f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17
+ftests: f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 f19
# Rule parsing tests
-ptests: i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15
+ptests: i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 \
+ i20 i21
-ntests: n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12
+ntests: n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 n14
nitests: ni1 ni2 ni3 ni4 ni5 ni6 ni7 ni8 ni9 ni10 ni11 ni12 ni13 ni14 ni15 ni16
@@ -40,16 +41,16 @@ ipv6: ipv6.1 ipv6.2 ipv6.3
bpf: bpf1 bpf-f1
-f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14:
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f19:
@/bin/sh ./dotest `awk "/^$@ / { print; } " test.format`
-f15 f16 f17:
+f15 f16 f17 f18:
@/bin/sh ./mtest `awk "/^$@ / { print; } " test.format`
-i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 bpf1:
+i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 bpf1:
@/bin/sh ./itest `awk "/^$@ / { print; } " test.format`
-n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12:
+n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 n14:
@/bin/sh ./nattest `awk "/^$@ / { print; } " test.format`
ni1 ni2 ni3 ni4 ni5 ni7 ni8 ni9 ni10 ni11 ni12 ni13 ni14 ni15 ni16:
@@ -77,9 +78,9 @@ bpf-f1:
/bin/sh ./bpftest `awk "/^$@ / { print; } " test.format`
clean:
- /bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17
- /bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15
- /bin/rm -f n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12
+ /bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 f19
+ /bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21
+ /bin/rm -f n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 n14
/bin/rm -f ni1 ni2 ni3 ni4 ni5 ni6 ni7 ni8 ni9
/bin/rm -f ni10 ni11 ni12 ni13 ni14 ni15 ni16
/bin/rm -f in1 in2 in3 in4 in5 in6
diff --git a/contrib/ipfilter/test/dotest b/contrib/ipfilter/test/dotest
index 71c8cce..72853d4 100644
--- a/contrib/ipfilter/test/dotest
+++ b/contrib/ipfilter/test/dotest
@@ -1,5 +1,8 @@
#!/bin/sh
+thistest=$1
format=$2
+output=$3
+tuning=$4
if [ -f /usr/ucb/touch ] ; then
TOUCH=/usr/ucb/touch
else
@@ -11,18 +14,21 @@ else
fi
fi
fi
-echo "$1...";
-/bin/cp /dev/null results/$1
+if [ "$tuning" != "" ] ; then
+ tuning="-T $tuning"
+fi
+echo "${thistest}...";
+/bin/cp /dev/null results/${thistest}
( while read rule; do
- echo "$rule" | ../ipftest -F $format -Rbr - -i input/$1 >> results/$1;
+ echo "$rule" | ../ipftest -F $format -Rbr - -i input/${thistest} $tuning>> results/${thistest};
if [ $? -ne 0 ] ; then
exit 1;
fi
- echo "--------" >> results/$1
-done ) < regress/$1
-cmp expected/$1 results/$1
+ echo "--------" >> results/${thistest}
+done ) < regress/${thistest}
+cmp expected/${thistest} results/${thistest}
status=$?
if [ $status = 0 ] ; then
- $TOUCH $1
+ $TOUCH ${thistest}
fi
exit $status
diff --git a/contrib/ipfilter/test/expected/bpf1 b/contrib/ipfilter/test/expected/bpf1
index 9d0ad1b..76381a7 100644
--- a/contrib/ipfilter/test/expected/bpf1
+++ b/contrib/ipfilter/test/expected/bpf1
@@ -1,4 +1,4 @@
-pass in bpf { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
-pass out bpf { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
-pass in bpf { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
-pass out bpf { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
+pass in bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
+pass out bpf-v4 { "0 0 0 0 0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x1 0x6 0 0 0" }
+pass in bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
+pass out bpf-v4 { "0 0 0 0 0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x1 0x6 0 0 0" }
diff --git a/contrib/ipfilter/test/expected/f13 b/contrib/ipfilter/test/expected/f13
index b3c7e54..2a0195b 100644
--- a/contrib/ipfilter/test/expected/f13
+++ b/contrib/ipfilter/test/expected/f13
@@ -1,6 +1,12 @@
pass
nomatch
nomatch
+pass
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
nomatch
nomatch
nomatch
@@ -15,6 +21,12 @@ nomatch
block
nomatch
nomatch
+block
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
nomatch
nomatch
nomatch
@@ -39,6 +51,12 @@ nomatch
nomatch
nomatch
pass
+pass
+pass
+nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -53,8 +71,14 @@ nomatch
nomatch
nomatch
block
+block
+block
+nomatch
+nomatch
+nomatch
+nomatch
--------
-pass
+block
nomatch
nomatch
pass
@@ -67,6 +91,12 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+pass
+nomatch
+pass
+pass
--------
block
nomatch
@@ -81,4 +111,50 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+block
+nomatch
+block
+block
+--------
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+pass
+pass
+nomatch
+nomatch
+nomatch
+nomatch
+pass
+pass
+nomatch
+nomatch
+nomatch
+nomatch
+--------
+block
+block
+nomatch
+pass
+block
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+pass
+nomatch
+nomatch
+pass
--------
diff --git a/contrib/ipfilter/test/expected/f17 b/contrib/ipfilter/test/expected/f17
index 4fe3acf..c586e5b 100644
--- a/contrib/ipfilter/test/expected/f17
+++ b/contrib/ipfilter/test/expected/f17
@@ -3,4 +3,5 @@ block return-rst
pass
pass
pass
+pass
--------
diff --git a/contrib/ipfilter/test/expected/f18 b/contrib/ipfilter/test/expected/f18
new file mode 100644
index 0000000..801abd3
--- /dev/null
+++ b/contrib/ipfilter/test/expected/f18
@@ -0,0 +1,5 @@
+pass
+pass
+pass
+pass
+--------
diff --git a/contrib/ipfilter/test/expected/f19 b/contrib/ipfilter/test/expected/f19
new file mode 100644
index 0000000..5ee2e9d
--- /dev/null
+++ b/contrib/ipfilter/test/expected/f19
@@ -0,0 +1,10 @@
+pass
+pass
+pass
+nomatch
+--------
+pass
+nomatch
+nomatch
+nomatch
+--------
diff --git a/contrib/ipfilter/test/expected/f7 b/contrib/ipfilter/test/expected/f7
index 6aa7951..7a4daed 100644
--- a/contrib/ipfilter/test/expected/f7
+++ b/contrib/ipfilter/test/expected/f7
@@ -7,6 +7,12 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
--------
pass
pass
@@ -17,6 +23,12 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -27,6 +39,12 @@ block
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -37,6 +55,12 @@ pass
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -47,6 +71,28 @@ nomatch
block
block
block
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+--------
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+pass
+pass
+pass
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -54,7 +100,45 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
+pass
+pass
+nomatch
+nomatch
+nomatch
+nomatch
+--------
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+pass
pass
+nomatch
+nomatch
+--------
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
+nomatch
pass
pass
--------
diff --git a/contrib/ipfilter/test/expected/f9 b/contrib/ipfilter/test/expected/f9
index 709744d..cc5be68 100644
--- a/contrib/ipfilter/test/expected/f9
+++ b/contrib/ipfilter/test/expected/f9
@@ -4,10 +4,16 @@ block
block
block
block
+block
+block
+block
--------
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
pass
pass
nomatch
@@ -16,6 +22,9 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
block
nomatch
--------
@@ -23,6 +32,9 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
pass
nomatch
--------
@@ -32,6 +44,9 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -39,6 +54,9 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -46,6 +64,9 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -53,20 +74,29 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
+nomatch
block
nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
--------
nomatch
+nomatch
pass
nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
--------
pass
pass
@@ -74,9 +104,15 @@ pass
pass
pass
pass
+pass
+pass
+pass
--------
block
block
+block
+nomatch
+nomatch
nomatch
nomatch
nomatch
@@ -84,6 +120,9 @@ nomatch
--------
pass
pass
+pass
+nomatch
+nomatch
nomatch
nomatch
nomatch
@@ -95,6 +134,9 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -102,6 +144,9 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -109,6 +154,9 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
@@ -116,10 +164,16 @@ nomatch
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
--------
nomatch
nomatch
nomatch
+nomatch
+nomatch
+nomatch
block
block
nomatch
diff --git a/contrib/ipfilter/test/expected/i1 b/contrib/ipfilter/test/expected/i1
index 93530f9..c012af8 100644
--- a/contrib/ipfilter/test/expected/i1
+++ b/contrib/ipfilter/test/expected/i1
@@ -6,10 +6,12 @@ count in from any to any
pass in from !any to any
block in from any to !any
pass in on ed0(!) from 127.0.0.1/32 to 127.0.0.1/32
+pass in on ed0(!),vx0(!) from 127.0.0.1/32 to 127.0.0.1/32
block in log first on lo0(!) from any to any
pass in log body quick from any to any
block return-rst in quick on le0(!) proto tcp from any to any
block return-icmp in on qe0(!) from any to any
block return-icmp(host-unr) in on qe0(!) from any to any
+block return-icmp-as-dest in on le0(!) from any to any
block return-icmp-as-dest(port-unr) in on qe0(!) from any to any
pass out on longNICname0(!) from 254.220.186.152/32 to 254.220.186.152/32
diff --git a/contrib/ipfilter/test/expected/i11 b/contrib/ipfilter/test/expected/i11
index 058d03a..26b8b78 100644
--- a/contrib/ipfilter/test/expected/i11
+++ b/contrib/ipfilter/test/expected/i11
@@ -1,8 +1,10 @@
pass in on ed0(!) proto tcp from 127.0.0.1/32 to 127.0.0.1/32 port = 23 keep state
-block in log first on lo0(!) proto tcp/udp from any to any keep state
+block in log first on lo0(!) proto tcp/udp from any to any port = 7 keep state
pass in proto udp from 127.0.0.1/32 to 127.0.0.1/32 port = 20499 keep frags
+pass in proto udp from 127.0.0.1/32 to 127.0.0.1/32 port = 2049 keep frags (strict)
pass in proto udp from 127.0.0.1/32 to 127.0.0.1/32 port = 53 keep state keep frags
pass in on ed0(!) out-via vx0(!) proto udp from any to any keep state
pass out on ppp0(!) in-via le0(!) proto tcp from any to any keep state
+pass in on ed0(!),vx0(!) out-via vx0(!),ed0(!) proto udp from any to any keep state
pass in proto tcp from any port > 1024 to 127.0.0.1/32 port = 1024 keep state
pass in proto tcp from any to any flags S/FSRPAU keep state (limit 101,strict,newisn,no-icmp-err)
diff --git a/contrib/ipfilter/test/expected/i12 b/contrib/ipfilter/test/expected/i12
index 22a3488..e21724c 100644
--- a/contrib/ipfilter/test/expected/i12
+++ b/contrib/ipfilter/test/expected/i12
@@ -13,14 +13,14 @@ pass in from 2.2.2.0/24 to 5.5.5.5/32 port = 25
pass in from 3.3.3.3/32 to 5.5.5.5/32 port = 25
pass in from 2.2.2.0/24 to 6.6.6.6/32 port = 25
pass in from 3.3.3.3/32 to 6.6.6.6/32 port = 25
-pass in proto tcp from 2.2.2.0/24 to 5.5.5.5/32 port = 53
-pass in proto tcp from 3.3.3.3/32 to 5.5.5.5/32 port = 53
-pass in proto tcp from 2.2.2.0/24 to 6.6.6.6/32 port = 53
-pass in proto tcp from 3.3.3.3/32 to 6.6.6.6/32 port = 53
-pass in proto tcp from 2.2.2.0/24 to 5.5.5.5/32 port = 9
-pass in proto tcp from 3.3.3.3/32 to 5.5.5.5/32 port = 9
-pass in proto tcp from 2.2.2.0/24 to 6.6.6.6/32 port = 9
-pass in proto tcp from 3.3.3.3/32 to 6.6.6.6/32 port = 9
+pass in proto tcp from 2.2.2.0/24 port = 53 to 5.5.5.5/32
+pass in proto tcp from 3.3.3.3/32 port = 53 to 5.5.5.5/32
+pass in proto tcp from 2.2.2.0/24 port = 9 to 5.5.5.5/32
+pass in proto tcp from 3.3.3.3/32 port = 9 to 5.5.5.5/32
+pass in proto tcp from 2.2.2.0/24 port = 53 to 6.6.6.6/32
+pass in proto tcp from 3.3.3.3/32 port = 53 to 6.6.6.6/32
+pass in proto tcp from 2.2.2.0/24 port = 9 to 6.6.6.6/32
+pass in proto tcp from 3.3.3.3/32 port = 9 to 6.6.6.6/32
pass in proto udp from 2.2.2.0/24 to 5.5.5.5/32 port = 53
pass in proto udp from 3.3.3.3/32 to 5.5.5.5/32 port = 53
pass in proto udp from 2.2.2.0/24 to 6.6.6.6/32 port = 53
@@ -32,3 +32,8 @@ pass in proto udp from 3.3.3.3/32 to 6.6.6.6/32 port = 9
pass in from 10.10.10.10/32 to 11.11.11.11/32
pass in from pool/101(!) to hash/202(!)
pass in from hash/303(!) to pool/404(!)
+table role = ipf type = tree number =
+ { ! 1.1.1.1/32; 2.2.2.2/32; ! 2.2.0.0/16; };
+table role = ipf type = tree number =
+ { 1.1.0.0/16; };
+pass in from pool/0(!) to pool/0(!)
diff --git a/contrib/ipfilter/test/expected/i14 b/contrib/ipfilter/test/expected/i14
index 5a10155..08ba19a 100644
--- a/contrib/ipfilter/test/expected/i14
+++ b/contrib/ipfilter/test/expected/i14
@@ -6,3 +6,5 @@ block in on vm0(!) proto tcp/udp from any to any head 101
pass in proto tcp/udp from 1.1.1.1/32 to 2.2.2.2/32 group 101
pass in proto tcp from 1.0.0.1/32 to 2.0.0.2/32 group 101
pass in proto udp from 2.0.0.2/32 to 3.0.0.3/32 group 101
+block in on vm0(!) proto tcp/udp from any to any head vm0-group
+pass in proto tcp/udp from 1.1.1.1/32 to 2.2.2.2/32 group vm0-group
diff --git a/contrib/ipfilter/test/expected/i16 b/contrib/ipfilter/test/expected/i16
new file mode 100644
index 0000000..c5b3cf3
--- /dev/null
+++ b/contrib/ipfilter/test/expected/i16
@@ -0,0 +1,3 @@
+block out all
+100 pass in all
+10101 pass out proto tcp from any to any
diff --git a/contrib/ipfilter/test/expected/i17 b/contrib/ipfilter/test/expected/i17
new file mode 100644
index 0000000..bcc4d2d
--- /dev/null
+++ b/contrib/ipfilter/test/expected/i17
@@ -0,0 +1,10 @@
+List of active MAP/Redirect filters:
+
+List of active sessions:
+
+Hostmap table:
+List of active state sessions:
+List of configured pools
+List of configured hash tables
+List of groups configured (set 0)
+List of groups configured (set 1)
diff --git a/contrib/ipfilter/test/expected/i18 b/contrib/ipfilter/test/expected/i18
new file mode 100644
index 0000000..1aaa04f
--- /dev/null
+++ b/contrib/ipfilter/test/expected/i18
@@ -0,0 +1,10 @@
+pass in tos 0x50 from any to any
+pass in tos 0x80 from any to any
+pass in tos 0x28 from any to any
+block in ttl 0 from any to any
+block in ttl 1 from any to any
+block in ttl 2 from any to any
+block in ttl 3 from any to any
+block in ttl 4 from any to any
+block in ttl 5 from any to any
+block in ttl 6 from any to any
diff --git a/contrib/ipfilter/test/expected/i19 b/contrib/ipfilter/test/expected/i19
new file mode 100644
index 0000000..4ca19b5
--- /dev/null
+++ b/contrib/ipfilter/test/expected/i19
@@ -0,0 +1,22 @@
+block in log level user.debug quick proto icmp from any to any
+block in log level mail.info quick proto icmp from any to any
+block in log level daemon.notice quick proto icmp from any to any
+block in log level auth.warn quick proto icmp from any to any
+block in log level syslog.err quick proto icmp from any to any
+block in log level lpr.crit quick proto icmp from any to any
+block in log level news.alert quick proto icmp from any to any
+block in log level uucp.emerg quick proto icmp from any to any
+block in log level cron.debug quick proto icmp from any to any
+block in log level ftp.info quick proto icmp from any to any
+block in log level authpriv.notice quick proto icmp from any to any
+block in log level !!!.warn quick proto icmp from any to any
+block in log level local0.err quick proto icmp from any to any
+block in log level local1.crit quick proto icmp from any to any
+block in log level local2.alert quick proto icmp from any to any
+block in log level local3.emerg quick proto icmp from any to any
+block in log level local4.debug quick proto icmp from any to any
+block in log level local5.info quick proto icmp from any to any
+block in log level local6.notice quick proto icmp from any to any
+block in log level local7.warn quick proto icmp from any to any
+block in log level kern.err quick proto icmp from any to any
+block in log level !!!.emerg quick proto icmp from any to any
diff --git a/contrib/ipfilter/test/expected/i2 b/contrib/ipfilter/test/expected/i2
index 37ec9c4..5ff18f4 100644
--- a/contrib/ipfilter/test/expected/i2
+++ b/contrib/ipfilter/test/expected/i2
@@ -5,3 +5,4 @@ block in proto ipv6 from any to any
block in proto udp from any to any
block in proto 250 from any to any
pass in proto tcp/udp from any to any
+block in proto tcp/udp from any to any
diff --git a/contrib/ipfilter/test/expected/i20 b/contrib/ipfilter/test/expected/i20
new file mode 100644
index 0000000..77eabdb
--- /dev/null
+++ b/contrib/ipfilter/test/expected/i20
@@ -0,0 +1,4 @@
+pass in on ppp0(!) from ppp0/peer to ppp0/32
+block in on hme0(!) from any to hme0/bcast
+pass in on bge0(!) from bge0/net to bge0/32
+block in on eri0(!) from any to eri0/netmasked
diff --git a/contrib/ipfilter/test/expected/i21 b/contrib/ipfilter/test/expected/i21
new file mode 100644
index 0000000..a5f55b3
--- /dev/null
+++ b/contrib/ipfilter/test/expected/i21
@@ -0,0 +1,10 @@
+pass in from any port = 10101 to any
+pass out from any to any port != 22
+block in from any port 20:21 to any
+block out from any to any port 10 <> 100
+pass out from any to any port = 3
+pass out from any to any port = 5
+pass out from any to any port = 7
+pass out from any to any port = 9
+block in from any port = 20 to any
+block in from any port = 25 to any
diff --git a/contrib/ipfilter/test/expected/i4 b/contrib/ipfilter/test/expected/i4
index 89c0995..639dae8 100644
--- a/contrib/ipfilter/test/expected/i4
+++ b/contrib/ipfilter/test/expected/i4
@@ -5,4 +5,5 @@ pass in proto udp from 127.0.0.1/32 port > 32000 to 127.0.0.1/32 port < 29000
block in proto udp from any port != 123 to any port < 7
block in proto tcp from any port = 25 to any port > 25
pass in proto tcp/udp from any port 1 >< 3 to any port 1 <> 3
+pass in proto tcp/udp from any port 2:2 to any port 10:20
pass in log first quick proto tcp from any port > 1023 to any port = 1723 flags S/FSRPAU keep state
diff --git a/contrib/ipfilter/test/expected/i6 b/contrib/ipfilter/test/expected/i6
index 40fe185..e4b14c3 100644
--- a/contrib/ipfilter/test/expected/i6
+++ b/contrib/ipfilter/test/expected/i6
@@ -7,4 +7,6 @@ pass in on le0(!) dup-to qe0(!):127.0.0.1 to hme0(!):10.1.1.1 from 127.0.0.1/32
block in quick on qe0(!) to qe1(!) from any to any
block in quick to qe1(!) from any to any
pass out quick dup-to hme0(!) from any to any
+pass out quick on hme0(!) reply-to hme1(!) from any to any
+pass in on le0(!) dup-to qe0(!):127.0.0.1 reply-to hme1(!):10.10.10.10 all
pass in quick fastroute all
diff --git a/contrib/ipfilter/test/expected/i7 b/contrib/ipfilter/test/expected/i7
index c46364b..309cd28 100644
--- a/contrib/ipfilter/test/expected/i7
+++ b/contrib/ipfilter/test/expected/i7
@@ -2,3 +2,8 @@ pass in on ed0(!) proto tcp from 127.0.0.1/32 to 127.0.0.1/32 port = 23 flags S/
block in on lo0(!) proto tcp from any to any flags A/FSRPAU
pass in on lo0(!) proto tcp from any to any flags /SPA
block in on lo0(!) proto tcp from any to any flags C/A
+pass in on lo0(!) proto tcp from any to any flags S/SA
+block in on lo0(!) proto tcp from any to any flags S/SA
+pass in on lo0(!) proto tcp from any to any flags S/FSRPAU
+block in on lo0(!) proto tcp from any to any flags /A
+pass in on lo0(!) proto tcp from any to any flags S/SA
diff --git a/contrib/ipfilter/test/expected/i8 b/contrib/ipfilter/test/expected/i8
index 77dc177..5533a7d 100644
--- a/contrib/ipfilter/test/expected/i8
+++ b/contrib/ipfilter/test/expected/i8
@@ -1,2 +1,33 @@
pass in proto icmp from 127.0.0.1/32 to 127.0.0.1/32 icmp-type timest
block in proto icmp from any to any icmp-type unreach code 1
+pass in proto icmp from any to any icmp-type unreach code 15
+pass in proto icmp from any to any icmp-type unreach code 13
+pass in proto icmp from any to any icmp-type unreach code 8
+pass in proto icmp from any to any icmp-type unreach code 4
+pass in proto icmp from any to any icmp-type unreach code 9
+pass in proto icmp from any to any icmp-type unreach code 11
+pass in proto icmp from any to any icmp-type unreach code 14
+pass in proto icmp from any to any icmp-type unreach code 10
+pass in proto icmp from any to any icmp-type unreach code 12
+pass in proto icmp from any to any icmp-type unreach code 7
+pass in proto icmp from any to any icmp-type unreach code 1
+pass in proto icmp from any to any icmp-type unreach code 6
+pass in proto icmp from any to any icmp-type unreach code 0
+pass in proto icmp from any to any icmp-type unreach code 3
+pass in proto icmp from any to any icmp-type unreach code 2
+pass in proto icmp from any to any icmp-type unreach code 5
+pass in proto icmp from any to any icmp-type echo
+pass in proto icmp from any to any icmp-type echorep
+pass in proto icmp from any to any icmp-type inforeq
+pass in proto icmp from any to any icmp-type inforep
+pass in proto icmp from any to any icmp-type maskrep
+pass in proto icmp from any to any icmp-type maskreq
+pass in proto icmp from any to any icmp-type paramprob
+pass in proto icmp from any to any icmp-type redir
+pass in proto icmp from any to any icmp-type unreach
+pass in proto icmp from any to any icmp-type routerad
+pass in proto icmp from any to any icmp-type routersol
+pass in proto icmp from any to any icmp-type squench
+pass in proto icmp from any to any icmp-type timest
+pass in proto icmp from any to any icmp-type timestrep
+pass in proto icmp from any to any icmp-type timex
diff --git a/contrib/ipfilter/test/expected/i9 b/contrib/ipfilter/test/expected/i9
index bae7c9b..bb4e54f 100644
--- a/contrib/ipfilter/test/expected/i9
+++ b/contrib/ipfilter/test/expected/i9
@@ -3,5 +3,10 @@ block in from any to any with ipopts
pass in from any to any with opt nop,rr,zsu
pass in from any to any with opt nop,rr,zsu not opt lsrr,ssrr
pass in from 127.0.0.1/32 to 127.0.0.1/32 with not frag
+pass in from 127.0.0.1/32 to 127.0.0.1/32 with frag,frag-body
pass in proto tcp from any to any flags S/FSRPAU with not oow keep state
pass in proto tcp from any to any flags S/FSRPAU with not bad,bad-src,bad-nat
+block in quick from any to any with not nat
+block in quick from any to any with not lowttl
+pass in from any to any with mbcast,not bcast,mcast,not state
+pass in from any to any with opt mtup,mtur,encode,ts,tr,sec,e-sec,cipso,satid,ssrr,addext,visa,imitd,eip,finn,dps,sdb,nsapa,rtralrt,ump
diff --git a/contrib/ipfilter/test/expected/in1 b/contrib/ipfilter/test/expected/in1
index ce5a610..8c47a92 100644
--- a/contrib/ipfilter/test/expected/in1
+++ b/contrib/ipfilter/test/expected/in1
@@ -3,6 +3,8 @@ map le0 0.0.0.1/32 -> 0.0.0.1/32
map le0 128.0.0.0/1 -> 0.0.0.0/0
map le0 10.0.0.0/8 -> 1.2.3.0/24
map le0 10.0.0.0/8 -> 1.2.3.0/24
+map le0 10.0.0.0/8 -> 1.2.3.0/24
+map le0 0.0.0.5/0.0.0.255 -> 1.2.3.0/24
map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45
map ppp0 192.168.0.0/16 -> 0.0.0.0/32 portmap tcp 10000:19999
map ppp0 192.168.0.0/16 -> 0.0.0.0/32 portmap udp 20000:29999
@@ -25,3 +27,4 @@ map ppp0 192.168.0.0/16 -> 0.0.0.0/32 portmap tcp 10000:19999 frag age 30/30
map fxp0 from 192.168.0.0/18 to any port = 21 -> 1.2.3.4/32 proxy port 21 ftp/tcp
map thisisalonginte 0.0.0.0/0 -> 0.0.0.0/32 mssclamp 1452 tag freddyliveshere
map bar0 0.0.0.0/0 -> 0.0.0.0/32 icmpidmap icmp 1000:2000
+map ppp0,adsl0 0.0.0.0/0 -> 0.0.0.0/32
diff --git a/contrib/ipfilter/test/expected/in2 b/contrib/ipfilter/test/expected/in2
index 61c0d18..1dc7b68 100644
--- a/contrib/ipfilter/test/expected/in2
+++ b/contrib/ipfilter/test/expected/in2
@@ -2,7 +2,10 @@ rdr le0 9.8.7.6/32 port 0 -> 1.1.1.1 port 0 tcp
rdr le0 9.8.7.6/32 -> 1.1.1.1 ip
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp
rdr le0 9.8.7.6/32 -> 1.1.1.1 ip
+rdr le0 9.0.0.0/8 -> 1.1.1.1 ip
+rdr le0 9.8.0.0/16 -> 1.1.1.1 ip
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp
+rdr le0 9.8.7.6/32 port 80 -> 0.0.0.0/0 port 80 tcp
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 udp
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp/udp
rdr le0 9.8.7.6/32 -> 1.1.1.1 icmp
@@ -11,7 +14,7 @@ rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp round-robin
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin
rdr le0 9.8.7.6/32 -> 1.1.1.1 ip frag
rdr le0 9.8.7.6/32 -> 1.1.1.1 icmp frag
-rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp frag
+rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp/udp frag
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp round-robin frag
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin frag
rdr le0 9.8.7.6/32 -> 1.1.1.1 ip frag age 10/10
@@ -65,3 +68,4 @@ rdr le0 9.8.7.6/32 port 1000-2000 -> 1.1.1.1 port 5555 tcp
rdr le0 9.8.7.6/32 port 1000-2000 -> 1.1.1.1 port = 5555 tcp
rdr le0 0.0.0.0/0 -> 254.220.186.152 ip
rdr le0 0.0.0.0/0 -> 254.220.186.152,254.220.186.152 ip
+rdr adsl0,ppp0 0.0.0.0/0 port 25 -> 127.0.0.1 port 25 tcp
diff --git a/contrib/ipfilter/test/expected/in5 b/contrib/ipfilter/test/expected/in5
index 7b3120a..f371b35 100644
--- a/contrib/ipfilter/test/expected/in5
+++ b/contrib/ipfilter/test/expected/in5
@@ -1,3 +1,4 @@
+map le0 from 9.8.7.6/32 port > 1024 to any -> 1.1.1.1/32 portmap tcp 10000:20000
rdr le0 from any to 9.8.7.6/32 port = 0 -> 1.1.1.1 port 0 tcp
rdr le0 from any to 9.8.7.6/32 -> 1.1.1.1 ip
rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 tcp
diff --git a/contrib/ipfilter/test/expected/in6 b/contrib/ipfilter/test/expected/in6
index 08bbff0..338bd80 100644
--- a/contrib/ipfilter/test/expected/in6
+++ b/contrib/ipfilter/test/expected/in6
@@ -1,3 +1,7 @@
map foo0 from any port = 1 to any port != 0 -> 0.0.0.0/32 udp
+map foo0 from any port = 1 to any port != 0 -> 0.0.0.0/32 udp
+map foo0 from any port < 1 to any port > 0 -> 0.0.0.0/32 tcp
map foo0 from any port < 1 to any port > 0 -> 0.0.0.0/32 tcp
map foo0 from any port <= 1 to any port >= 0 -> 0.0.0.0/32 tcp/udp
+map foo0 from any port <= 1 to any port >= 0 -> 0.0.0.0/32 tcp/udp
+map foo0 from any port 1 >< 20 to any port 20 <> 40 -> 0.0.0.0/32 tcp/udp
diff --git a/contrib/ipfilter/test/expected/n1 b/contrib/ipfilter/test/expected/n1
index 0f87034..537f9bb 100644
--- a/contrib/ipfilter/test/expected/n1
+++ b/contrib/ipfilter/test/expected/n1
@@ -1,105 +1,105 @@
-ip 20(20) 255 10.1.1.0 > 10.1.1.2
-ip 20(20) 255 10.2.2.2 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
-ip 48(20) 1 10.2.2.2 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.1.1.1
-ip 48(20) 1 10.4.3.2 > 10.3.4.1
-ip 48(20) 1 10.4.3.2 > 10.3.4.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.3
-ip 48(20) 1 10.4.3.2 > 10.3.4.4
-ip 48(20) 1 10.4.3.2 > 10.3.4.5
-ip 20(20) 34 10.1.1.2 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.1.1.2 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.5
-ip 20(20) 34 10.1.1.3 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.1.1.3 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 20(20) 255 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 255 10.2.2.2 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
+ip #0 48(20) 1 10.2.2.2 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.1.1.1
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.1
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.3
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.4
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
-------------------------------
-ip 20(20) 255 10.3.4.5 > 10.1.1.2
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.3.4.5 > 10.1.1.1
-ip 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.0
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 48(20) 1 10.3.4.5 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.2.2.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.1
-ip 48(20) 1 10.4.3.2 > 10.3.4.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.3
-ip 48(20) 1 10.4.3.2 > 10.3.4.4
-ip 48(20) 1 10.4.3.2 > 10.1.1.1
-ip 20(20) 34 10.3.4.5 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.3.4.5 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.1.1.2
-ip 20(20) 34 10.1.1.3 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.3.4.5 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 20(20) 255 10.3.4.5 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.3.4.5 > 10.1.1.1
+ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.0
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 48(20) 1 10.3.4.5 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.2.2.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.1
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.3
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.4
+ip #0 48(20) 1 10.4.3.2 > 10.1.1.1
+ip #0 20(20) 34 10.3.4.5 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.3.4.5 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.1.1.2
+ip #0 20(20) 34 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.3.4.5 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
-------------------------------
-ip 20(20) 255 10.3.4.1 > 10.1.1.2
-ip 20(20) 255 10.3.4.2 > 10.1.1.2
-ip 20(20) 255 10.3.4.3 > 10.1.1.1
-ip 40(20) 6 10.3.4.3,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.3,1026 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
-ip 48(20) 1 10.3.4.3 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.2.2.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.1
-ip 48(20) 1 10.4.3.2 > 10.3.4.2
-ip 48(20) 1 10.4.3.2 > 10.1.1.1
-ip 48(20) 1 10.4.3.2 > 10.3.4.4
-ip 48(20) 1 10.4.3.2 > 10.3.4.5
-ip 20(20) 34 10.3.4.3 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.3.4.3 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.5
-ip 20(20) 34 10.3.4.4 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.3.4.4 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 20(20) 255 10.3.4.1 > 10.1.1.2
+ip #0 20(20) 255 10.3.4.2 > 10.1.1.2
+ip #0 20(20) 255 10.3.4.3 > 10.1.1.1
+ip #0 40(20) 6 10.3.4.3,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.3,1026 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
+ip #0 48(20) 1 10.3.4.3 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.2.2.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.1
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.2
+ip #0 48(20) 1 10.4.3.2 > 10.1.1.1
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.4
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.5
+ip #0 20(20) 34 10.3.4.3 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.3.4.3 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.5
+ip #0 20(20) 34 10.3.4.4 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.3.4.4 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
-------------------------------
diff --git a/contrib/ipfilter/test/expected/n11 b/contrib/ipfilter/test/expected/n11
index 3732709..5257a64 100644
--- a/contrib/ipfilter/test/expected/n11
+++ b/contrib/ipfilter/test/expected/n11
@@ -1,51 +1,51 @@
-ip 20(20) 255 10.1.1.0 > 10.1.1.2
-ip 20(20) 255 1.6.7.8 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 255 1.6.7.8 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
-------------------------------
-ip 20(20) 255 10.2.2.2 > 10.1.1.2
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.2.2.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.1.1.0
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.0
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 20(20) 255 10.2.2.2 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.2.2.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.1.1.0
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.0
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
-------------------------------
-ip 20(20) 255 10.3.4.0 > 10.1.1.2
-ip 20(20) 255 10.3.4.1 > 10.1.1.2
-ip 20(20) 255 10.3.4.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.1.1.5
-ip 20(20) 255 10.1.1.1 > 10.1.1.5
-ip 20(20) 255 10.1.1.2 > 10.1.1.5
+ip #0 20(20) 255 10.3.4.0 > 10.1.1.2
+ip #0 20(20) 255 10.3.4.1 > 10.1.1.2
+ip #0 20(20) 255 10.3.4.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.1.1.5
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.5
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.5
-------------------------------
diff --git a/contrib/ipfilter/test/expected/n13 b/contrib/ipfilter/test/expected/n13
new file mode 100644
index 0000000..bfe2018
--- /dev/null
+++ b/contrib/ipfilter/test/expected/n13
@@ -0,0 +1,5 @@
+ip #0 20(20) 0 203.1.1.23 > 150.1.1.1
+ip #0 20(20) 0 203.1.1.23 > 150.1.1.2
+ip #0 20(20) 0 203.1.1.24 > 150.1.1.2
+ip #0 20(20) 0 203.1.1.25 > 150.1.1.1
+-------------------------------
diff --git a/contrib/ipfilter/test/expected/n14 b/contrib/ipfilter/test/expected/n14
new file mode 100644
index 0000000..4669300
--- /dev/null
+++ b/contrib/ipfilter/test/expected/n14
@@ -0,0 +1,5 @@
+ip #0 40(20) 6 10.2.2.5,2000 > 10.1.1.254,80
+ip #0 40(20) 6 10.2.2.6,2000 > 10.1.1.253,80
+ip #0 40(20) 6 10.2.2.7,2000 > 10.1.1.254,80
+ip #0 40(20) 6 10.2.2.5,2001 > 10.1.1.254,80
+-------------------------------
diff --git a/contrib/ipfilter/test/expected/n2 b/contrib/ipfilter/test/expected/n2
index dc70138..827272e 100644
--- a/contrib/ipfilter/test/expected/n2
+++ b/contrib/ipfilter/test/expected/n2
@@ -1,80 +1,80 @@
-ip 40(20) 6 10.2.2.2,10000 > 10.1.1.1,1025
-ip 40(20) 6 10.2.2.2,10001 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.1.1.1 > 10.1.2.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
-ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
-ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
-ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 40(20) 6 10.2.2.2,10000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.2.2.2,10001 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.1.1.1 > 10.1.2.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
+ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
+ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
+ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.1.1.1 > 10.1.2.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 28(20) 17 10.3.4.5,10000 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
-ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
-ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
-ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.1.1.1 > 10.1.2.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 28(20) 17 10.3.4.5,10000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
+ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
+ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
+ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
-ip 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10001 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.1.1.1 > 10.1.2.1
-ip 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10003 > 10.1.1.1,1025
-ip 28(20) 17 10.3.4.1,10004 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10005 > 10.1.2.1,80
-ip 40(20) 6 10.3.4.1,10006 > 10.1.3.1,80
-ip 40(20) 6 10.3.4.1,10007 > 10.1.4.1,80
-ip 40(20) 6 10.3.4.1,10008 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10001 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.1.1.1 > 10.1.2.1
+ip #0 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10003 > 10.1.1.1,1025
+ip #0 28(20) 17 10.3.4.1,10004 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10005 > 10.1.2.1,80
+ip #0 40(20) 6 10.3.4.1,10006 > 10.1.3.1,80
+ip #0 40(20) 6 10.3.4.1,10007 > 10.1.4.1,80
+ip #0 40(20) 6 10.3.4.1,10008 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
-ip 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,40001 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.1.1.1 > 10.1.2.1
-ip 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 28(20) 17 10.3.4.5,40000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,40001 > 10.1.2.1,80
-ip 40(20) 6 10.3.4.5,40000 > 10.1.3.1,80
-ip 40(20) 6 10.3.4.5,40001 > 10.1.4.1,80
-ip 40(20) 6 10.3.4.5,40000 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.1.1.3,2000
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.1.1.1 > 10.1.2.1
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 28(20) 17 10.3.4.5,40000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.2.1,80
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.3.1,80
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.4.1,80
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.1.1.3,2000
-------------------------------
diff --git a/contrib/ipfilter/test/expected/n3 b/contrib/ipfilter/test/expected/n3
index 03c0717..0e019ae 100644
--- a/contrib/ipfilter/test/expected/n3
+++ b/contrib/ipfilter/test/expected/n3
@@ -1,12 +1,12 @@
-ip 40(20) 6 192.168.2.1,1488 > 203.1.1.1,80
-ip 40(20) 6 192.168.2.1,1276 > 203.1.1.1,80
-ip 40(20) 6 192.168.2.1,1032 > 203.1.1.1,80
-ip 28(20) 17 192.168.2.1,1032 > 203.1.1.1,80
-ip 40(20) 6 192.168.2.1,65299 > 203.1.1.1,80
+ip #0 40(20) 6 192.168.2.1,1488 > 203.1.1.1,80
+ip #0 40(20) 6 192.168.2.1,1276 > 203.1.1.1,80
+ip #0 40(20) 6 192.168.2.1,1032 > 203.1.1.1,80
+ip #0 28(20) 17 192.168.2.1,1032 > 203.1.1.1,80
+ip #0 40(20) 6 192.168.2.1,65299 > 203.1.1.1,80
-------------------------------
-ip 40(20) 6 192.168.1.1,1488 > 203.1.1.1,80
-ip 40(20) 6 192.168.1.1,1276 > 203.1.1.1,80
-ip 40(20) 6 192.168.1.0,1032 > 203.1.1.1,80
-ip 28(20) 17 192.168.1.0,1032 > 203.1.1.1,80
-ip 40(20) 6 192.168.1.255,65299 > 203.1.1.1,80
+ip #0 40(20) 6 192.168.1.1,1488 > 203.1.1.1,80
+ip #0 40(20) 6 192.168.1.1,1276 > 203.1.1.1,80
+ip #0 40(20) 6 192.168.1.0,1032 > 203.1.1.1,80
+ip #0 28(20) 17 192.168.1.0,1032 > 203.1.1.1,80
+ip #0 40(20) 6 192.168.1.255,65299 > 203.1.1.1,80
-------------------------------
diff --git a/contrib/ipfilter/test/expected/n4 b/contrib/ipfilter/test/expected/n4
index 8cdf78c..9349542 100644
--- a/contrib/ipfilter/test/expected/n4
+++ b/contrib/ipfilter/test/expected/n4
@@ -1,66 +1,66 @@
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
-ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
-ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
-ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-ip 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
+ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
+ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345
-------------------------------
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
-ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
-ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
-ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-ip 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
+ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
+ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345
-------------------------------
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12346 > 10.2.2.1,10023
-ip 40(20) 6 10.1.0.0,23 > 10.3.3.3,12346
-ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
-ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-ip 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12346 > 10.2.2.1,10023
+ip #0 40(20) 6 10.1.0.0,23 > 10.3.3.3,12346
+ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345
-------------------------------
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23
-ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
-ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
-ip 28(20) 17 10.3.3.3,12345 > 10.2.2.1,10053
-ip 28(20) 17 10.1.1.0,53 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-ip 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23
+ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
+ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
+ip #0 28(20) 17 10.3.3.3,12345 > 10.2.2.1,10053
+ip #0 28(20) 17 10.1.1.0,53 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345
-------------------------------
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,23
-ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53
-ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
-ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
-ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
-ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53
-ip 40(20) 6 10.1.1.0,53 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,23
+ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53
+ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
+ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
+ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53
+ip #0 40(20) 6 10.1.1.0,53 > 10.3.3.3,12345
-------------------------------
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,23
-ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53
-ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
-ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
-ip 28(20) 17 10.3.3.3,12345 > 10.2.2.1,53
-ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53
-ip 40(20) 6 10.1.1.0,53 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,23
+ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53
+ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23
+ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346
+ip #0 28(20) 17 10.3.3.3,12345 > 10.2.2.1,53
+ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53
+ip #0 40(20) 6 10.1.1.0,53 > 10.3.3.3,12345
-------------------------------
diff --git a/contrib/ipfilter/test/expected/n5 b/contrib/ipfilter/test/expected/n5
index 521c737..0e578b6 100644
--- a/contrib/ipfilter/test/expected/n5
+++ b/contrib/ipfilter/test/expected/n5
@@ -1,330 +1,330 @@
-ip 20(20) 255 10.1.1.0 > 10.1.1.2
-ip 20(20) 255 10.2.2.2 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
-ip 48(20) 1 10.2.2.2 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.1.1.1
-ip 48(20) 1 10.4.3.2 > 10.3.4.3
-ip 48(20) 1 10.4.3.2 > 10.3.4.5
-ip 20(20) 34 10.1.1.2 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.1.1.2 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.5
-ip 20(20) 34 10.1.1.3 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.1.1.3 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
-ip 40(20) 6 10.2.2.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.2.2.2,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.2.2.2 > 10.1.2.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
-ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
-ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
-ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.2.2.2,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.2.2.2,1025 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 20(20) 255 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 255 10.2.2.2 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
+ip #0 48(20) 1 10.2.2.2 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.1.1.1
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.3
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 40(20) 6 10.2.2.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.2.2.2,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.2.2.2 > 10.1.2.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
+ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
+ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
+ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.2.2.2,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.2.2.2,1025 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
-ip 20(20) 255 10.3.4.5 > 10.1.1.2
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.3.4.5 > 10.1.1.1
-ip 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.0
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 48(20) 1 10.1.1.1 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.2.2.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.3
-ip 48(20) 1 10.4.3.2 > 10.3.4.5
-ip 20(20) 34 10.1.1.2 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.1.1.2 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.5
-ip 20(20) 34 10.1.1.3 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.1.1.3 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.3.4.5 > 10.1.1.2
-ip 20(20) 0 10.3.4.5 > 10.1.2.1
-ip 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025
-ip 28(20) 17 10.3.4.5,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,2000 > 10.1.2.1,80
-ip 40(20) 6 10.3.4.5,2001 > 10.1.3.1,80
-ip 40(20) 6 10.3.4.5,2002 > 10.1.4.1,80
-ip 40(20) 6 10.3.4.5,2003 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 20(20) 255 10.3.4.5 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.3.4.5 > 10.1.1.1
+ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.0
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 48(20) 1 10.1.1.1 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.2.2.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.3
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.3.4.5 > 10.1.1.2
+ip #0 20(20) 0 10.3.4.5 > 10.1.2.1
+ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025
+ip #0 28(20) 17 10.3.4.5,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,2000 > 10.1.2.1,80
+ip #0 40(20) 6 10.3.4.5,2001 > 10.1.3.1,80
+ip #0 40(20) 6 10.3.4.5,2002 > 10.1.4.1,80
+ip #0 40(20) 6 10.3.4.5,2003 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
-ip 20(20) 255 10.1.1.0 > 10.1.1.2
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
-ip 48(20) 1 10.3.4.1 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.2.2.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.3
-ip 48(20) 1 10.4.3.2 > 10.3.4.5
-ip 20(20) 34 10.3.4.1 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.3.4.1 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.5
-ip 20(20) 34 10.3.4.2 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.3.4.2 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.1.1.1 > 10.1.2.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
-ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
-ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
-ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.3.4.3,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.3.4.3,1025 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 28(20) 17 10.3.4.3,1025 > 10.3.4.5,40001
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 20(20) 255 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
+ip #0 48(20) 1 10.3.4.1 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.2.2.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.3
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.5
+ip #0 20(20) 34 10.3.4.1 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.3.4.1 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.5
+ip #0 20(20) 34 10.3.4.2 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.3.4.2 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.1.1.1 > 10.1.2.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
+ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
+ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
+ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.3.4.3,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.3.4.3,1025 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 28(20) 17 10.3.4.3,1025 > 10.3.4.5,40001
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
-ip 20(20) 255 10.1.1.0 > 10.1.1.2
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
-ip 48(20) 1 10.1.1.1 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.2.2.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.3
-ip 48(20) 1 10.4.3.2 > 10.3.4.5
-ip 20(20) 34 10.1.1.2 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.1.1.2 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.5
-ip 20(20) 34 10.1.1.3 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.1.1.3 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.1.1.1 > 10.1.2.1
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
-ip 28(20) 17 10.3.4.5,10000 > 10.1.1.1,1025
-ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
-ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
-ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
-ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 28(20) 17 10.3.4.5,10001 > 10.3.4.5,40001
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 20(20) 255 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
+ip #0 48(20) 1 10.1.1.1 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.2.2.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.3
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.1.1.1 > 10.1.2.1
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025
+ip #0 28(20) 17 10.3.4.5,10000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80
+ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80
+ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80
+ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 28(20) 17 10.3.4.5,10001 > 10.3.4.5,40001
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
-ip 20(20) 255 10.1.1.0 > 10.1.1.2
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10001 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
-ip 48(20) 1 10.1.1.1 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.2.2.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.3
-ip 48(20) 1 10.4.3.2 > 10.3.4.5
-ip 20(20) 34 10.1.1.2 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.1.1.2 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.5
-ip 20(20) 34 10.1.1.3 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.1.1.3 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
-ip 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10003 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.1.1.1 > 10.1.2.1
-ip 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10001 > 10.1.1.1,1025
-ip 28(20) 17 10.3.4.1,10004 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.1,10005 > 10.1.2.1,80
-ip 40(20) 6 10.3.4.1,10006 > 10.1.3.1,80
-ip 40(20) 6 10.3.4.1,10007 > 10.1.4.1,80
-ip 40(20) 6 10.3.4.1,10008 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.3.4.1,10009 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.3.4.1,10010 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
-ip 28(20) 17 10.3.4.1,10011 > 10.3.4.5,40001
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.3.4.1,10012 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 20(20) 255 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10001 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
+ip #0 48(20) 1 10.1.1.1 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.2.2.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.3
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10003 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.1.1.1 > 10.1.2.1
+ip #0 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10001 > 10.1.1.1,1025
+ip #0 28(20) 17 10.3.4.1,10004 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.1,10005 > 10.1.2.1,80
+ip #0 40(20) 6 10.3.4.1,10006 > 10.1.3.1,80
+ip #0 40(20) 6 10.3.4.1,10007 > 10.1.4.1,80
+ip #0 40(20) 6 10.3.4.1,10008 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.3.4.1,10009 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.3.4.1,10010 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000
+ip #0 28(20) 17 10.3.4.1,10011 > 10.3.4.5,40001
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.3.4.1,10012 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
-ip 20(20) 255 10.1.1.0 > 10.1.1.2
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025
-ip 20(20) 255 10.2.2.1 > 10.1.2.1
-ip 20(20) 255 10.2.2.2 > 10.1.2.1
-ip 20(20) 255 10.1.1.1 > 10.1.1.2
-ip 20(20) 255 10.1.1.2 > 10.1.1.1
-ip 20(20) 255 10.2.2.1 > 10.2.1.1
-ip 20(20) 255 10.2.2.2 > 10.2.1.1
-ip 20(20) 255 10.2.2.3 > 10.1.1.1
-ip 20(20) 255 10.2.3.4 > 10.2.2.2
-ip 20(20) 255 10.1.1.1 > 10.2.2.2
-ip 20(20) 255 10.1.1.2 > 10.2.2.2
-ip 20(20) 255 10.1.1.0 > 10.3.4.5
-ip 20(20) 255 10.1.1.1 > 10.3.4.5
-ip 20(20) 255 10.1.1.2 > 10.3.4.5
-ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
-ip 48(20) 1 10.1.1.1 > 10.4.3.2
-ip 48(20) 1 10.4.3.2 > 10.2.2.2
-ip 48(20) 1 10.4.3.2 > 10.3.4.3
-ip 48(20) 1 10.4.3.2 > 10.3.4.5
-ip 20(20) 34 10.1.1.2 > 10.4.3.2
-ip 20(20) 34 10.4.3.2 > 10.3.4.4
-ip 20(20) 34 10.1.1.2 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.5
-ip 20(20) 34 10.1.1.3 > 10.4.3.4
-ip 20(20) 34 10.4.3.4 > 10.3.4.6
-ip 20(20) 35 10.1.1.3 > 10.4.3.4
-ip 20(20) 35 10.4.3.4 > 10.3.4.7
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,40000 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.0 > 10.1.1.2
-ip 20(20) 0 10.1.1.1 > 10.1.2.1
-ip 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025
-ip 28(20) 17 10.3.4.5,40001 > 10.1.1.1,1025
-ip 40(20) 6 10.3.4.5,40000 > 10.1.2.1,80
-ip 40(20) 6 10.3.4.5,40001 > 10.1.3.1,80
-ip 40(20) 6 10.3.4.5,40000 > 10.1.4.1,80
-ip 40(20) 6 10.3.4.5,40001 > 10.1.4.1,80
-ip 20(20) 0 10.1.1.1 > 10.1.1.2
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 20(20) 0 10.1.1.2 > 10.1.1.1
-ip 40(20) 6 10.3.4.5,40000 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
-ip 40(20) 6 10.3.4.5,40001 > 10.3.4.5,40000
-ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
-ip 28(20) 17 10.3.4.5,40000 > 10.3.4.5,40001
-ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 20(20) 255 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025
+ip #0 20(20) 255 10.2.2.1 > 10.1.2.1
+ip #0 20(20) 255 10.2.2.2 > 10.1.2.1
+ip #0 20(20) 255 10.1.1.1 > 10.1.1.2
+ip #0 20(20) 255 10.1.1.2 > 10.1.1.1
+ip #0 20(20) 255 10.2.2.1 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.2 > 10.2.1.1
+ip #0 20(20) 255 10.2.2.3 > 10.1.1.1
+ip #0 20(20) 255 10.2.3.4 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.1 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.2 > 10.2.2.2
+ip #0 20(20) 255 10.1.1.0 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.1 > 10.3.4.5
+ip #0 20(20) 255 10.1.1.2 > 10.3.4.5
+ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025
+ip #0 48(20) 1 10.1.1.1 > 10.4.3.2
+ip #0 48(20) 1 10.4.3.2 > 10.2.2.2
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.3
+ip #0 48(20) 1 10.4.3.2 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.2
+ip #0 20(20) 34 10.4.3.2 > 10.3.4.4
+ip #0 20(20) 34 10.1.1.2 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.5
+ip #0 20(20) 34 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 34 10.4.3.4 > 10.3.4.6
+ip #0 20(20) 35 10.1.1.3 > 10.4.3.4
+ip #0 20(20) 35 10.4.3.4 > 10.3.4.7
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.0 > 10.1.1.2
+ip #0 20(20) 0 10.1.1.1 > 10.1.2.1
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025
+ip #0 28(20) 17 10.3.4.5,40001 > 10.1.1.1,1025
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.2.1,80
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.3.1,80
+ip #0 40(20) 6 10.3.4.5,40000 > 10.1.4.1,80
+ip #0 40(20) 6 10.3.4.5,40001 > 10.1.4.1,80
+ip #0 20(20) 0 10.1.1.1 > 10.1.1.2
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 20(20) 0 10.1.1.2 > 10.1.1.1
+ip #0 40(20) 6 10.3.4.5,40000 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000
+ip #0 40(20) 6 10.3.4.5,40001 > 10.3.4.5,40000
+ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025
+ip #0 28(20) 17 10.3.4.5,40000 > 10.3.4.5,40001
+ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
+ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001
-------------------------------
diff --git a/contrib/ipfilter/test/expected/n6 b/contrib/ipfilter/test/expected/n6
index d28d4f1..2b2c37f 100644
--- a/contrib/ipfilter/test/expected/n6
+++ b/contrib/ipfilter/test/expected/n6
@@ -1,70 +1,70 @@
-ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23
-ip 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23
-ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
-ip 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23
-ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
-ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23
+ip #0 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23
+ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23
+ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-------------------------------
-ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23
-ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
-ip 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23
-ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
-ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23
+ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23
+ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-------------------------------
-ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23
-ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
-ip 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23
-ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
-ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23
+ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23
+ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-------------------------------
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,23
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23
-ip 40(20) 6 10.3.0.1,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
-ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
-ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
-ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,23
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23
+ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023
+ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-------------------------------
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,23
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23
-ip 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23
-ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
-ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
-ip 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23
-ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
-ip 28(20) 17 10.3.3.3,12345 > 10.2.2.1,10053
-ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
-ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,23
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23
+ip #0 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23
+ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23
+ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 28(20) 17 10.3.3.3,12345 > 10.2.2.1,10053
+ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53
+ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53
-------------------------------
diff --git a/contrib/ipfilter/test/expected/n7 b/contrib/ipfilter/test/expected/n7
index db8bb50..eb23534 100644
--- a/contrib/ipfilter/test/expected/n7
+++ b/contrib/ipfilter/test/expected/n7
@@ -1,30 +1,30 @@
-ip 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22
-ip 40(20) 6 10.2.3.1,1231 > 10.2.2.1,10023
-ip 40(20) 6 10.2.3.1,1232 > 10.2.2.1,10050
-ip 40(20) 6 10.2.3.1,1233 > 10.2.2.1,10079
-ip 40(20) 6 10.2.3.1,1234 > 10.1.1.1,80
-ip 40(20) 6 10.2.3.1,1235 > 10.1.1.2,80
-ip 40(20) 6 10.2.3.1,1236 > 10.1.1.3,80
-ip 40(20) 6 10.2.3.1,1237 > 10.1.1.4,80
-ip 40(20) 6 10.2.3.1,1238 > 10.1.1.4,80
+ip #0 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22
+ip #0 40(20) 6 10.2.3.1,1231 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.3.1,1232 > 10.2.2.1,10050
+ip #0 40(20) 6 10.2.3.1,1233 > 10.2.2.1,10079
+ip #0 40(20) 6 10.2.3.1,1234 > 10.1.1.1,80
+ip #0 40(20) 6 10.2.3.1,1235 > 10.1.1.2,80
+ip #0 40(20) 6 10.2.3.1,1236 > 10.1.1.3,80
+ip #0 40(20) 6 10.2.3.1,1237 > 10.1.1.4,80
+ip #0 40(20) 6 10.2.3.1,1238 > 10.1.1.4,80
-------------------------------
-ip 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22
-ip 40(20) 6 10.2.3.1,1231 > 10.2.2.1,10023
-ip 40(20) 6 10.2.3.1,1232 > 10.2.2.1,10023
-ip 40(20) 6 10.2.3.1,1233 > 10.2.2.1,10023
-ip 40(20) 6 10.2.3.1,1234 > 10.1.1.1,80
-ip 40(20) 6 10.2.3.1,1235 > 10.1.1.2,80
-ip 40(20) 6 10.2.3.1,1236 > 10.1.1.3,80
-ip 40(20) 6 10.2.3.1,1237 > 10.1.1.4,80
-ip 40(20) 6 10.2.3.1,1238 > 10.1.1.4,80
+ip #0 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22
+ip #0 40(20) 6 10.2.3.1,1231 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.3.1,1232 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.3.1,1233 > 10.2.2.1,10023
+ip #0 40(20) 6 10.2.3.1,1234 > 10.1.1.1,80
+ip #0 40(20) 6 10.2.3.1,1235 > 10.1.1.2,80
+ip #0 40(20) 6 10.2.3.1,1236 > 10.1.1.3,80
+ip #0 40(20) 6 10.2.3.1,1237 > 10.1.1.4,80
+ip #0 40(20) 6 10.2.3.1,1238 > 10.1.1.4,80
-------------------------------
-ip 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22
-ip 40(20) 6 10.2.3.1,1231 > 10.1.1.1,23
-ip 40(20) 6 10.2.3.1,1232 > 10.1.1.1,50
-ip 40(20) 6 10.2.3.1,1233 > 10.1.1.1,79
-ip 40(20) 6 10.2.3.1,1234 > 10.2.2.1,3128
-ip 40(20) 6 10.2.3.1,1235 > 1.2.2.129,3128
-ip 40(20) 6 10.2.3.1,1236 > 10.2.2.1,3128
-ip 40(20) 6 10.2.3.1,1237 > 1.2.2.129,3128
-ip 40(20) 6 10.2.3.1,1238 > 10.2.2.1,3128
+ip #0 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22
+ip #0 40(20) 6 10.2.3.1,1231 > 10.1.1.1,23
+ip #0 40(20) 6 10.2.3.1,1232 > 10.1.1.1,50
+ip #0 40(20) 6 10.2.3.1,1233 > 10.1.1.1,79
+ip #0 40(20) 6 10.2.3.1,1234 > 10.2.2.1,3128
+ip #0 40(20) 6 10.2.3.1,1235 > 1.2.2.129,3128
+ip #0 40(20) 6 10.2.3.1,1236 > 10.2.2.1,3128
+ip #0 40(20) 6 10.2.3.1,1237 > 1.2.2.129,3128
+ip #0 40(20) 6 10.2.3.1,1238 > 10.2.2.1,3128
-------------------------------
diff --git a/contrib/ipfilter/test/expected/p1 b/contrib/ipfilter/test/expected/p1
index c3f7afa..9f02804 100644
--- a/contrib/ipfilter/test/expected/p1
+++ b/contrib/ipfilter/test/expected/p1
@@ -9,6 +9,8 @@ nomatch
List of active MAP/Redirect filters:
List of active sessions:
+
+Hostmap table:
List of active state sessions:
List of configured pools
table role = ipf type = tree number = 100
diff --git a/contrib/ipfilter/test/expected/p2 b/contrib/ipfilter/test/expected/p2
index bb15bdf..2f330c2 100644
--- a/contrib/ipfilter/test/expected/p2
+++ b/contrib/ipfilter/test/expected/p2
@@ -1,4 +1,4 @@
-nomatch
+block
nomatch
pass
nomatch
@@ -9,10 +9,15 @@ pass
List of active MAP/Redirect filters:
List of active sessions:
+
+Hostmap table:
List of active state sessions:
List of configured pools
List of configured hash tables
# 'anonymous' table
+table role = ipf type = hash number = 2147483650 size = 3
+ { 4.4.0.0/16; 127.0.0.1/32; };
+# 'anonymous' table
table role = ipf type = hash number = 2147483649 size = 3
{ 4.4.0.0/16; 127.0.0.1/32; };
List of groups configured (set 0)
diff --git a/contrib/ipfilter/test/expected/p3 b/contrib/ipfilter/test/expected/p3
index 136543f..94fde9e 100644
--- a/contrib/ipfilter/test/expected/p3
+++ b/contrib/ipfilter/test/expected/p3
@@ -13,6 +13,8 @@ block
List of active MAP/Redirect filters:
List of active sessions:
+
+Hostmap table:
List of active state sessions:
List of configured pools
List of configured hash tables
diff --git a/contrib/ipfilter/test/input/f13 b/contrib/ipfilter/test/input/f13
index 0ca607e..d7b0724 100644
--- a/contrib/ipfilter/test/input/f13
+++ b/contrib/ipfilter/test/input/f13
@@ -1,51 +1,94 @@
-# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF,MF,FO=0 SYN
+# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF,FO=0 SYN
+[in]
4500 0028 0001 4000 3f06 36cc 0101 0101 0201 0101
-0401 0019 0000 0000 0000 0000 50 02 2000 86c5 0000
+0401 0019 0000 0000 0000 0000 50 02 2000 86bb 0000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP MF ACK
+[in]
4500 0024 0002 2000 3f06 56cf 0101 0101 0201 0101
0401 0019 0000 0000 0000 0000 5010 2000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP FO=2 ACK
+[in]
4500 002c 0002 0002 3f06 76c5 0101 0101 0201 0101
0000 0000 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f 1011 1213
-# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF MF FO=0 SYN
+# 1.1.1.1,1024 -> 2.1.1.1,25 TTL=63 TCP DF MF FO=0 SYN
+[in]
4500 0028 0003 6000 3f06 16ca 0101 0101 0201 0101
-0401 0019 0000 0000 0000 0000 5010 2000 0000 0000
+0400 0019 7000 0000 0000 0000 5002 2000 0000 0000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF FO=0
+[in]
4500 001c 0004 6000 3f06 16d5 0101 0101 0201 0101
0401 0019 0000 0000
# 1.1.1.1 -> 2.1.1.1 TTL=63 TCP DF FO=1 SYN
+[in]
4500 001c 0005 6001 3f06 16d3 0101 0101 0201 0101
0000 0000 5010 2000
# 1.1.1.1 -> 2.1.1.1 TTL=63 UDP DF MF FO=0
+[in]
4500 0014 0006 6000 3f11 16d0 0101 0101 0201 0101
# 1.1.1.1,53 -> 2.1.1.1,53 TTL=63 UDP MF FO=0
+[in]
4500 0018 0007 2000 3f11 56cb 0101 0101 0201 0101
0035 0035
# 1.1.1.1,53 -> 2.1.1.1,53 TTL=63 UDP MF FO=0
+[in]
4500 001c 0008 2000 3f11 56c6 0101 0101 0201 0101
0035 0035 0004 0000
# 1.1.1.1,53 -> 2.1.1.1,54 TTL=63 UDP MF FO=0 (short)
+[in]
4500 0018 0008 2000 3f11 56ca 0101 0101 0201 0101
0035 0036
# 1.1.1.1,21 -> 2.1.1.1,54 TTL=63 UDP MF FO=0
+[in]
4500 001c 0008 2000 3f11 56c6 0101 0101 0201 0101
0015 0036 0004 0000
# 1.1.1.1,21 -> 2.1.1.1,54 TTL=63 TCP MF FO=0
+[in]
4500 001c 0008 2000 3f06 56d1 0101 0101 0201 0101
0015 0036 0000 0000 0000 0000 50 02 2000 0000 0000
+# 1.1.1.1 -> 2.1.1.1 TTL=63 UDP FO=3
+[in]
+4500 001c 0008 0003 3f11 76c3 0101 0101 0201 0101
+0000 0000 0000 0000
+
# 1.1.1.1 -> 2.1.1.1 TTL=63 UDP FO=1
+[in]
4500 001c 0008 0001 3f11 76c5 0101 0101 0201 0101
0000 0000 0000 0000
+# 2.1.1.1,53 -> 1.1.1.1,53 TTL=63 UDP
+[out]
+4500 001c 0008 0000 3f11 76c6 0201 0101 0101 0101
+0035 0035 0004 0000
+
+# 2.1.1.1,25 -> 1.1.1.1,1014 TTL=63 TCP DF SYN-ACK
+[out]
+4500 0028 0003 4000 3f06 36ca 0201 0101 0101 0101
+0019 0400 0000 0001 7000 0001 5012 2000 16b4 0000
+
+# 1.1.1.1,1024 -> 2.1.1.1,25 TTL=63 TCP DF ACK (OOW)
+[in]
+4500 0028 0003 4000 3f06 36ca 0101 0101 0201 0101
+0400 0019 0040 0000 0000 0000 5010 2000 8678 0000
+
+# 1.1.1.1,1024 -> 2.1.1.1,25 TTL=63 TCP DF ACK
+[in]
+4500 0028 0003 4000 3f06 36ca 0101 0101 0201 0101
+0400 0019 7000 0004 0000 0002 5010 2000 16b2 0000
+
+# 1.1.1.1,1024 -> 2.1.1.1,25 TTL=63 TCP DF ACK
+[in]
+4500 0028 0003 4000 3f06 36ca 0101 0101 0201 0101
+0400 0019 7000 0001 0000 0002 5010 2000 16b5 0000
+
diff --git a/contrib/ipfilter/test/input/f17 b/contrib/ipfilter/test/input/f17
index 18af566..a0d44d7 100644
--- a/contrib/ipfilter/test/input/f17
+++ b/contrib/ipfilter/test/input/f17
@@ -1,28 +1,39 @@
+# TCP 1.1.1.1,54076 -> 2.2.2.2,27 SYN
[out,ppp0]
4500 003c 8262 0000 4006 f254 0101 0101
0202 0202 d33c 0019 bfd0 8989 0000 0000
a002 4000 cfcd 0000 0204 05b4 0103 0300
0101 080a 008e 17f7 0000 0000
+# TCP 2.2.2.2,27 -> 1.1.1.1,54076 ACK
[in,ppp0]
4500 003c 8262 0000 1106 2155 0202 0202
0101 0101 0019 d33c 4020 3436 bfdf cbc9
5010 4000 694a 0000 0204 0584 0103 0300
0101 080a 008e 17f7 0000 0000
+# TCP 1.1.1.1,54076 -> 2.2.2.2,27 SYN
[out,ppp0]
4500 003c 8265 0000 4006 f251 0101 0101
0202 0202 d33c 0019 bfd0 8989 0000 0000
a002 4000 cfc2 0000 0204 05b4 0103 0300
0101 080a 008e 1802 0000 0000
+# TCP 2.2.2.2,27 -> 1.1.1.1,54076 SYN-ACK
[in,ppp0]
4500 002c 7442 4000 2906 d784 0202 0202
0101 0101 0019 d33c ed67 4d4e bfd0 898a
6012 2118 19c2 0000 0204 0584
+# TCP 1.1.1.1,54076 -> 2.2.2.2,27 ACK
[out,ppp0]
-4500 002c 8262 0000 4006 f264 0101 0101
+4500 0028 8262 0000 4006 f268 0101 0101
0202 0202 d33c 0019 bfd0 898a ed67 4d4e
-5010 4000 0ce0 0000 0000
+5010 4000 1268 0000
+
+# TCP 2.2.2.2,27 -> 1.1.1.1,54076 ACK+data
+[in,ppp0]
+4500 002a 7442 4000 2906 d786 0202 0202
+0101 0101 0019 d33c ed67 4d4e bfd0 8990
+5012 2118 2f43 0000 0203
diff --git a/contrib/ipfilter/test/input/f18 b/contrib/ipfilter/test/input/f18
new file mode 100644
index 0000000..9ecbb7f
--- /dev/null
+++ b/contrib/ipfilter/test/input/f18
@@ -0,0 +1,4 @@
+in on le1 1.1.1.1 3.3.3.3
+in on le1 1.1.1.1 5.5.5.5
+out on le1 2.2.2.2 4.4.4.4
+out on le1 2.2.2.2 6.6.6.6
diff --git a/contrib/ipfilter/test/input/f19 b/contrib/ipfilter/test/input/f19
new file mode 100644
index 0000000..6cab988
--- /dev/null
+++ b/contrib/ipfilter/test/input/f19
@@ -0,0 +1,4 @@
+in tcp 127.0.0.1,1 127.0.0.1,21 S
+in tcp 127.0.0.1,2 127.0.0.1,21 S
+in tcp 127.0.0.1,3 127.0.0.1,21 S
+in tcp 127.0.0.1,4 127.0.0.1,21 S
diff --git a/contrib/ipfilter/test/input/f7 b/contrib/ipfilter/test/input/f7
index 2721af2..dbc9e33 100644
--- a/contrib/ipfilter/test/input/f7
+++ b/contrib/ipfilter/test/input/f7
@@ -7,3 +7,9 @@ in icmp 1.1.1.1 2.1.1.1 unreach,3
in icmp 1.1.1.1 2.1.1.1 echorep
in icmp 1.1.1.1 2.1.1.1 echorep,1
in icmp 1.1.1.1 2.1.1.1 echorep,3
+in icmp 2.2.2.2 3.3.3.3 maskreq
+out icmp 3.3.3.3 2.2.2.2 maskrep
+in icmp 4.4.4.4 5.5.5.5 timest
+out icmp 5.5.5.5 4.4.4.4 timestrep
+in icmp 6.6.6.6 7.7.7.7 inforeq
+out icmp 7.7.7.7 6.6.6.6 inforep
diff --git a/contrib/ipfilter/test/input/f9 b/contrib/ipfilter/test/input/f9
index 33f3be3..e64e299 100644
--- a/contrib/ipfilter/test/input/f9
+++ b/contrib/ipfilter/test/input/f9
@@ -1,6 +1,9 @@
in 1.1.1.1 2.1.1.1 opt lsrr
+in 1.1.1.1 2.1.1.1 opt lsrr=1.1.1.1
in 1.1.1.1 2.1.1.1 opt lsrr,ssrr
in 1.1.1.1 2.1.1.1 opt ts
+in 1.1.1.1 2.1.1.1 opt satid
+in 1.1.1.1 2.1.1.1 opt satid=234
in 1.1.1.1 2.1.1.1 opt sec-class=topsecret
in 1.1.1.1 2.1.1.1 opt ssrr,sec-class=topsecret
in 1.1.1.1 2.1.1.1 opt sec
diff --git a/contrib/ipfilter/test/input/n13 b/contrib/ipfilter/test/input/n13
new file mode 100644
index 0000000..ac7bbbd
--- /dev/null
+++ b/contrib/ipfilter/test/input/n13
@@ -0,0 +1,4 @@
+out on le0 192.168.1.1 150.1.1.1
+out on le0 192.168.1.1 150.1.1.2
+out on le0 192.168.1.2 150.1.1.2
+out on le0 192.168.1.3 150.1.1.1
diff --git a/contrib/ipfilter/test/input/n14 b/contrib/ipfilter/test/input/n14
new file mode 100644
index 0000000..969eb1c
--- /dev/null
+++ b/contrib/ipfilter/test/input/n14
@@ -0,0 +1,4 @@
+in on gre0 tcp 10.2.2.5,2000 203.1.1.1,80
+in on gre0 tcp 10.2.2.6,2000 203.1.1.1,80
+in on gre0 tcp 10.2.2.7,2000 203.1.1.1,80
+in on gre0 tcp 10.2.2.5,2001 203.1.1.1,80
diff --git a/contrib/ipfilter/test/input/ni17 b/contrib/ipfilter/test/input/ni17
new file mode 100644
index 0000000..f9dec94
--- /dev/null
+++ b/contrib/ipfilter/test/input/ni17
@@ -0,0 +1,6 @@
+in on le0 tcp 10.2.2.5,2000 203.1.1.1,80
+in on le0 tcp 10.2.2.6,2000 203.1.1.1,80
+in on le0 tcp 10.2.2.7,2000 203.1.1.1,80
+in on le0 tcp 10.2.2.7,2001 203.1.1.1,80
+in on le0 tcp 10.2.2.8,2000 203.1.1.1,80
+in on le0 tcp 10.2.2.9,2000 203.1.1.1,80
diff --git a/contrib/ipfilter/test/itest b/contrib/ipfilter/test/itest
index 333afde..8fefc63 100644
--- a/contrib/ipfilter/test/itest
+++ b/contrib/ipfilter/test/itest
@@ -13,7 +13,14 @@ else
fi
echo "$1...";
/bin/cp /dev/null results/$1
-../ipf -Rnvf regress/$1 2>/dev/null > results/$1
+case $3 in
+ipf)
+ ../ipf -Rnvf regress/$1 2>/dev/null > results/$1
+ ;;
+ipftest)
+ ../ipftest -D -r regress/$1 -i /dev/null > results/$1
+ ;;
+esac
cmp expected/$1 results/$1
status=$?
if [ $status = 0 ] ; then
diff --git a/contrib/ipfilter/test/natipftest b/contrib/ipfilter/test/natipftest
index f5cfdb8..abdc760 100755
--- a/contrib/ipfilter/test/natipftest
+++ b/contrib/ipfilter/test/natipftest
@@ -27,7 +27,7 @@ single)
echo "$1...";
/bin/cp /dev/null results/$1
( while read rule; do
- echo "$rule" | ../ipftest -R $format -bx -r regress/$1.ipf -N - -i input/$1 >> \
+ echo "$rule" | ../ipftest -R $format -b -r regress/$1.ipf -N - -i input/$1 >> \
results/$1;
if [ $? -ne 0 ] ; then
exit 1;
@@ -43,7 +43,7 @@ single)
multi)
echo "$1...";
/bin/cp /dev/null results/$1
- ../ipftest -R $format -bx -r regress/$1.ipf -N regress/$1.nat \
+ ../ipftest -R $format -b -r regress/$1.ipf -N regress/$1.nat \
-i input/$1 >> results/$1;
if [ $? -ne 0 ] ; then
exit 2;
diff --git a/contrib/ipfilter/test/regress/bpf1 b/contrib/ipfilter/test/regress/bpf1
index 2c80283..5d83b77 100644
--- a/contrib/ipfilter/test/regress/bpf1
+++ b/contrib/ipfilter/test/regress/bpf1
@@ -1,4 +1,4 @@
pass in bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
-pass out bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
+pass out bpf-v4 { "src host 1.1.1.1" }
pass in bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
-pass out bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
+pass out bpf-v4 { "dst host 1.1.1.1" }
diff --git a/contrib/ipfilter/test/regress/f13 b/contrib/ipfilter/test/regress/f13
index f123e47..8106419 100644
--- a/contrib/ipfilter/test/regress/f13
+++ b/contrib/ipfilter/test/regress/f13
@@ -4,3 +4,5 @@ pass in proto udp from any to any port = 53 keep frags
block in proto udp from any to any port = 53 keep frags
pass in proto tcp from any to any port = 25 flags S/SA keep state keep frags
block in proto tcp from any to any port = 25 flags S/SA keep state keep frags
+pass in proto udp from any to any port = 53 keep frags(strict)
+pass in proto tcp from any to any port = 25 keep state(strict)
diff --git a/contrib/ipfilter/test/regress/f18 b/contrib/ipfilter/test/regress/f18
new file mode 100644
index 0000000..acba2b3
--- /dev/null
+++ b/contrib/ipfilter/test/regress/f18
@@ -0,0 +1,4 @@
+pass in from 1.1.1.1 to any
+pass out from 2.2.2.2 to any
+count in from 1.1.1.1 to 3.3.3.3
+count out from 2.2.2.2 to 4.4.4.4
diff --git a/contrib/ipfilter/test/regress/f19 b/contrib/ipfilter/test/regress/f19
new file mode 100644
index 0000000..d7770b8
--- /dev/null
+++ b/contrib/ipfilter/test/regress/f19
@@ -0,0 +1,2 @@
+pass in quick proto tcp all flags S keep state
+pass in quick proto tcp all flags S keep state(limit 1)
diff --git a/contrib/ipfilter/test/regress/f7 b/contrib/ipfilter/test/regress/f7
index 6848a68..be1b969 100644
--- a/contrib/ipfilter/test/regress/f7
+++ b/contrib/ipfilter/test/regress/f7
@@ -4,3 +4,6 @@ block in proto icmp from any to any icmp-type unreach code 3
pass in proto icmp from any to any icmp-type unreach code 3
block in proto icmp from any to any icmp-type echorep
pass in proto icmp from any to any icmp-type echorep
+pass in proto icmp all icmp-type maskreq keep state
+pass in proto icmp all icmp-type timest keep state
+pass in proto icmp all icmp-type inforeq keep state
diff --git a/contrib/ipfilter/test/regress/i1 b/contrib/ipfilter/test/regress/i1
index df60d2b..c86c320 100644
--- a/contrib/ipfilter/test/regress/i1
+++ b/contrib/ipfilter/test/regress/i1
@@ -7,10 +7,12 @@ count in from any to any
pass in from !any to any
block in from any to !any
pass in on ed0 from localhost to localhost
+pass in on ed0,vx0 from localhost to localhost
block in log first on lo0 from any to any
pass in log body quick from any to any
block return-rst in quick on le0 proto tcp from any to any
block return-icmp in on qe0 from any to any
block return-icmp(1) in on qe0 from any to any
+block return-icmp-as-dest in on le0 from any to any
block return-icmp-as-dest(port-unr) in on qe0 from any to any
pass out on longNICname0 from test.host.dots to test\.host.dots
diff --git a/contrib/ipfilter/test/regress/i11 b/contrib/ipfilter/test/regress/i11
index 2999a85..89b3589 100644
--- a/contrib/ipfilter/test/regress/i11
+++ b/contrib/ipfilter/test/regress/i11
@@ -1,8 +1,10 @@
pass in on ed0 proto tcp from localhost to localhost port = telnet keep state
-block in log first on lo0 proto tcp/udp from any to any keep state
+block in log first on lo0 proto tcp/udp from any to any port = echo keep state
pass in proto udp from localhost to localhost port = 20499 keep frag
+pass in proto udp from localhost to localhost port = 2049 keep frag(strict)
pass in proto udp from localhost to localhost port = 53 keep state keep frags
pass in on ed0 out-via vx0 proto udp from any to any keep state
pass out on ppp0 in-via le0 proto tcp from any to any keep state
+pass in on ed0,vx0 out-via vx0,ed0 proto udp from any to any keep state
pass in proto tcp from any port gt 1024 to localhost port eq 1024 keep state
pass in proto tcp all flags S keep state(strict,newisn,no-icmp-err,limit 101)
diff --git a/contrib/ipfilter/test/regress/i12 b/contrib/ipfilter/test/regress/i12
index b8b2f3e..5342702 100644
--- a/contrib/ipfilter/test/regress/i12
+++ b/contrib/ipfilter/test/regress/i12
@@ -2,8 +2,9 @@ pass in from 1.1.1.1/32 to 2.2.2.2/32
pass in from (2.2.2.2/24,3.3.3.3/32) to 4.4.4.4/32
pass in from (2.2.2.2/24,3.3.3.3/32) to (5.5.5.5/32,6.6.6.6/32)
pass in from (2.2.2.2/24,3.3.3.3/32) to (5.5.5.5/32,6.6.6.6/32) port = (22,25)
-pass in proto tcp from (2.2.2.2/24,3.3.3.3/32) to (5.5.5.5/32,6.6.6.6/32) port = (53,9)
+pass in proto tcp from (2.2.2.2/24,3.3.3.3/32) port = (53,9) to (5.5.5.5/32,6.6.6.6/32)
pass in proto udp from (2.2.2.2/24,3.3.3.3/32) to (5.5.5.5/32,6.6.6.6/32) port = (53,9)
pass in from 10.10.10.10 to 11.11.11.11
pass in from pool/101 to hash/202
pass in from hash/303 to pool/404
+pass in from pool=(!1.1.1.1,2.2.2.2,!2.2.0.0/16) to pool = ( 1.1.0.0/16 )
diff --git a/contrib/ipfilter/test/regress/i14 b/contrib/ipfilter/test/regress/i14
index 3c9d7b8..2cd2613 100644
--- a/contrib/ipfilter/test/regress/i14
+++ b/contrib/ipfilter/test/regress/i14
@@ -6,3 +6,5 @@ block in on vm0 proto tcp/udp all head 101
pass in from 1.1.1.1 to 2.2.2.2 group 101
pass in proto tcp from 1.0.0.1 to 2.0.0.2 group 101
pass in proto udp from 2.0.0.2 to 3.0.0.3 group 101
+block in on vm0 proto tcp/udp all head vm0-group
+pass in from 1.1.1.1 to 2.2.2.2 group vm0-group
diff --git a/contrib/ipfilter/test/regress/i16 b/contrib/ipfilter/test/regress/i16
new file mode 100644
index 0000000..5c9144a
--- /dev/null
+++ b/contrib/ipfilter/test/regress/i16
@@ -0,0 +1,3 @@
+0 block out all
+100 pass in all
+10101 pass out proto tcp all
diff --git a/contrib/ipfilter/test/regress/i17 b/contrib/ipfilter/test/regress/i17
new file mode 100644
index 0000000..a995ae5
--- /dev/null
+++ b/contrib/ipfilter/test/regress/i17
@@ -0,0 +1,11 @@
+100 pass in all
+200 pass in proto tcp all
+110 pass in proto udp all
+110 pass in from localhost to any
+pass in all
+pass in from localhost to any
+@0 100 pass in from localhost to any
+@1 pass in from any to localhost
+@0 pass in from 1.1.1.1 to any
+@1 110 pass in from 2.2.2.2 to any
+@2 pass in from 3.3.3.3 to any
diff --git a/contrib/ipfilter/test/regress/i18 b/contrib/ipfilter/test/regress/i18
new file mode 100644
index 0000000..c2845d1
--- /dev/null
+++ b/contrib/ipfilter/test/regress/i18
@@ -0,0 +1,2 @@
+pass in tos (80,0x80,40) all
+block in ttl (0,1,2,3,4,5,6) all
diff --git a/contrib/ipfilter/test/regress/i19 b/contrib/ipfilter/test/regress/i19
new file mode 100644
index 0000000..a09fd56
--- /dev/null
+++ b/contrib/ipfilter/test/regress/i19
@@ -0,0 +1,22 @@
+block in quick log level user.debug proto icmp all
+block in quick log level mail.info proto icmp all
+block in quick log level daemon.notice proto icmp all
+block in quick log level auth.warn proto icmp all
+block in quick log level syslog.err proto icmp all
+block in quick log level lpr.crit proto icmp all
+block in quick log level news.alert proto icmp all
+block in quick log level uucp.emerg proto icmp all
+block in quick log level cron.debug proto icmp all
+block in quick log level ftp.info proto icmp all
+block in quick log level authpriv.notice proto icmp all
+block in quick log level logalert.warn proto icmp all
+block in quick log level local0.err proto icmp all
+block in quick log level local1.crit proto icmp all
+block in quick log level local2.alert proto icmp all
+block in quick log level local3.emerg proto icmp all
+block in quick log level local4.debug proto icmp all
+block in quick log level local5.info proto icmp all
+block in quick log level local6.notice proto icmp all
+block in quick log level local7.warn proto icmp all
+block in quick log level kern.err proto icmp all
+block in quick log level security.emerg proto icmp all
diff --git a/contrib/ipfilter/test/regress/i2 b/contrib/ipfilter/test/regress/i2
index a3b9cd8..50f6107 100644
--- a/contrib/ipfilter/test/regress/i2
+++ b/contrib/ipfilter/test/regress/i2
@@ -5,3 +5,4 @@ block in proto ipv6 from any to any
block in proto 17 from any to any
block in proto 250 from any to any
pass in proto tcp/udp from any to any
+block in proto tcp-udp from any to any
diff --git a/contrib/ipfilter/test/regress/i20 b/contrib/ipfilter/test/regress/i20
new file mode 100644
index 0000000..99039ee
--- /dev/null
+++ b/contrib/ipfilter/test/regress/i20
@@ -0,0 +1,4 @@
+pass in on ppp0 from ppp0/peer to ppp0/32
+block in on hme0 from any to hme0/broadcast
+pass in on bge0 from bge0/network to bge0/32
+block in on eri0 from any to eri0/netmasked
diff --git a/contrib/ipfilter/test/regress/i21 b/contrib/ipfilter/test/regress/i21
new file mode 100644
index 0000000..bf797f9
--- /dev/null
+++ b/contrib/ipfilter/test/regress/i21
@@ -0,0 +1,6 @@
+pass in from port = 10101
+pass out from any to port != 22
+block in from port 20:21
+block out from any to port 10 <> 100
+pass out from any to port = (3,5,7,9)
+block in from port = (20,25)
diff --git a/contrib/ipfilter/test/regress/i4 b/contrib/ipfilter/test/regress/i4
index 7170dc2..8551f76 100644
--- a/contrib/ipfilter/test/regress/i4
+++ b/contrib/ipfilter/test/regress/i4
@@ -5,4 +5,5 @@ pass in proto 17 from localhost port > 32000 to localhost port < 29000
block in proto udp from any port != \ntp to any port < echo
block in proto tcp from any port = smtp to any port > 25
pass in proto tcp/udp from any port 1 >< 3 to any port 1 <> 3
+pass in proto tcp/udp from any port 2:2 to any port 10:20
pass in log first quick proto tcp from any port > 1023 to any port = 1723 flags S keep state
diff --git a/contrib/ipfilter/test/regress/i6 b/contrib/ipfilter/test/regress/i6
index 1a53089..0b371bd 100644
--- a/contrib/ipfilter/test/regress/i6
+++ b/contrib/ipfilter/test/regress/i6
@@ -7,4 +7,6 @@ pass in on le0 to hme0:10.1.1.1 dup-to qe0:127.0.0.1 from localhost to localhost
block in quick on qe0 to qe1 from any to any
block in quick to qe1 from any to any
pass out quick dup-to hme0 from any to any
+pass out quick on hme0 reply-to hme1 from any to any
+pass in on le0 dup-to qe0:127.0.0.1 reply-to hme1:10.10.10.10 all
pass in quick fastroute all
diff --git a/contrib/ipfilter/test/regress/i7 b/contrib/ipfilter/test/regress/i7
index 4f3328d..1a82940 100644
--- a/contrib/ipfilter/test/regress/i7
+++ b/contrib/ipfilter/test/regress/i7
@@ -2,3 +2,8 @@ pass in on ed0 proto tcp from localhost to localhost port = 23 flags S/SA
block in on lo0 proto tcp from any to any flags A
pass in on lo0 proto tcp from any to any flags /SAP
block in on lo0 proto tcp from any to any flags 0x80/A
+pass in on lo0 proto tcp from any to any flags S/18
+block in on lo0 proto tcp from any to any flags 2/18
+pass in on lo0 proto tcp from any to any flags 2
+block in on lo0 proto tcp from any to any flags /16
+pass in on lo0 proto tcp from any to any flags 2/SA
diff --git a/contrib/ipfilter/test/regress/i8 b/contrib/ipfilter/test/regress/i8
index bde6ed5..cc984b2 100644
--- a/contrib/ipfilter/test/regress/i8
+++ b/contrib/ipfilter/test/regress/i8
@@ -1,2 +1,31 @@
pass in proto icmp from localhost to localhost icmp-type timest
block in proto icmp from any to any icmp-type unreach code 1
+pass in proto icmp all icmp-type unreach code cutoff-preced
+pass in proto icmp all icmp-type unreach code filter-prohib
+pass in proto icmp all icmp-type unreach code isolate
+pass in proto icmp all icmp-type unreach code needfrag
+pass in proto icmp all icmp-type unreach code net-prohib
+pass in proto icmp all icmp-type unreach code net-tos
+pass in proto icmp all icmp-type unreach code host-preced
+pass in proto icmp all icmp-type unreach code host-prohib
+pass in proto icmp all icmp-type unreach code host-tos
+pass in proto icmp all icmp-type unreach code host-unk
+pass in proto icmp all icmp-type unreach code host-unr
+pass in proto icmp all icmp-type unreach code (net-unk,net-unr)
+pass in proto icmp all icmp-type unreach code port-unr
+pass in proto icmp all icmp-type unreach code proto-unr
+pass in proto icmp all icmp-type unreach code srcfail
+pass in proto icmp all icmp-type (echo,echorep)
+pass in proto icmp all icmp-type inforeq
+pass in proto icmp all icmp-type inforep
+pass in proto icmp all icmp-type maskrep
+pass in proto icmp all icmp-type maskreq
+pass in proto icmp all icmp-type paramprob
+pass in proto icmp all icmp-type redir
+pass in proto icmp all icmp-type unreach
+pass in proto icmp all icmp-type routerad
+pass in proto icmp all icmp-type routersol
+pass in proto icmp all icmp-type squench
+pass in proto icmp all icmp-type timest
+pass in proto icmp all icmp-type timestrep
+pass in proto icmp all icmp-type timex
diff --git a/contrib/ipfilter/test/regress/i9 b/contrib/ipfilter/test/regress/i9
index 2b8fb10..a966bed 100644
--- a/contrib/ipfilter/test/regress/i9
+++ b/contrib/ipfilter/test/regress/i9
@@ -2,6 +2,11 @@ pass in from localhost to localhost with short,frags
block in from any to any with ipopts
pass in from any to any with opt nop,rr,zsu
pass in from any to any with opt nop,rr,zsu not opt ssrr,lsrr
-pass in from localhost to localhost with not frag
+pass in from localhost to localhost and not frag
+pass in from localhost to localhost with frags,frag-body
pass in proto tcp all flags S with not oow keep state
pass in proto tcp all flags S with not bad,bad-src,bad-nat
+block in quick all with not nat
+block in quick all with not lowttl
+pass in all with mbcast,not bcast,multicast,not state
+pass in from any to any with opt mtur,mtup,encode,ts,tr,sec,cipso,satid,ssrr,visa,imitd,eip,finn,dps,sdb,nsapa,rtralrt,ump,addext,e-sec
diff --git a/contrib/ipfilter/test/regress/in1 b/contrib/ipfilter/test/regress/in1
index 145e3d0..163d834 100644
--- a/contrib/ipfilter/test/regress/in1
+++ b/contrib/ipfilter/test/regress/in1
@@ -3,14 +3,16 @@ map le0 1/32 -> 1/32
map le0 128.0.0.0/1 -> 0/0
map le0 10.0.0.0/8 -> 1.2.3.0/24
map le0 10.0.0.5/8 -> 1.2.3.4/24
+map le0 10.0.0.5/0xff000000 -> 1.2.3.4/24
+map le0 10.0.0.5/0xff -> 1.2.3.4/24
map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45
map ppp0 192.168.0.0/16 -> 0/32 portmap tcp 10000:19999
map ppp0 192.168.0.0/16 -> 0/32 portmap udp 20000:29999
map ppp0 192.168.0.0/16 -> 0/32 portmap tcp/udp 30000:39999
map ppp0 192.168.0.0/16 -> 0/32 portmap tcp auto
map ppp0 192.168.0.0/16 -> 0/32 portmap udp auto
-map ppp0 192.168.0.0/16 -> 0/32 portmap tcp/udp auto
-map ppp0 192.168.0.0/16 -> 0/32 proxy port ftp ftp/tcp
+map ppp0 192.168.0.0/16 -> 0/32 portmap tcpudp auto
+map ppp0 192.168.0.0/16 -> 0/32 proxy port ftp ftp/6
map ppp0 192.168.0.0/16 -> 0/32 proxy port 1010 ftp/tcp
map le0 0/0 -> 0/32 frag
map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45 frag
@@ -25,3 +27,4 @@ map ppp0 192.168.0.0/16 -> 0/32 portmap tcp 10000:19999 frag age 30
map fxp0 from 192.168.0.0/18 to 0/0 port = 21 -> 1.2.3.4/32 proxy port 21 ftp/tcp
map thisisalonginte 0/0 -> 0/32 mssclamp 1452 tag freddyliveshere
map bar0 0/0 -> 0/32 icmpidmap icmp 1000:2000
+map ppp0,adsl0 0/0 -> 0/32
diff --git a/contrib/ipfilter/test/regress/in2 b/contrib/ipfilter/test/regress/in2
index 222a28c..4a86de7 100644
--- a/contrib/ipfilter/test/regress/in2
+++ b/contrib/ipfilter/test/regress/in2
@@ -2,7 +2,10 @@ rdr le0 9.8.7.6/32 port 0 -> 1.1.1.1 port 0 tcp
rdr le0 9.8.7.6/32 port 0 -> 1.1.1.1 port 0 ip
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp
rdr le0 9.8.7.6/32 -> 1.1.1.1 ip
+rdr le0 9.8.7.6/0xff000000 -> 1.1.1.1 ip
+rdr le0 9.8.7.6/0xffff0000 -> 1.1.1.1 ip
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp
+rdr le0 9.8.7.6/32 port 80 -> 0/0 port 80 tcp
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 udp
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp/udp
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 icmp
@@ -11,7 +14,7 @@ rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp round-robin
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin
rdr le0 9.8.7.6/32 port 0 -> 1.1.1.1 port 0 ip frag
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 icmp frag
-rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp frag
+rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcpudp frag
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp round-robin frag
rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin frag
rdr le0 9.8.7.6/32 -> 1.1.1.1 ip frag age 10
@@ -65,3 +68,4 @@ rdr le0 9.8.7.6/32 port 1000-2000 -> 1.1.1.1 port 5555 tcp
rdr le0 9.8.7.6/32 port 1000-2000 -> 1.1.1.1 port = 5555 tcp
rdr le0 0/0 -> test.host.dots
rdr le0 0/0 -> test.host.dots,test.host.dots
+rdr adsl0,ppp0 0/0 port 25 -> 127.0.0.1 port 25
diff --git a/contrib/ipfilter/test/regress/in5 b/contrib/ipfilter/test/regress/in5
index d0a115c..c539b03 100644
--- a/contrib/ipfilter/test/regress/in5
+++ b/contrib/ipfilter/test/regress/in5
@@ -1,9 +1,10 @@
+map le0 from 9.8.7.6/32 port > 1024 to any -> 1.1.1.1 portmap 10000:20000 tcp
rdr le0 from any to 9.8.7.6/32 port = 0 -> 1.1.1.1 port 0 tcp
-rdr le0 from any to 9.8.7.6/32 port = 0 -> 1.1.1.1 port 0 ip
-rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 tcp
-rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 ip
-rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 tcp
-rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 udp
+rdr le0 from any to 9.8.7.6/0xffffffff port = 0 -> 1.1.1.1 port 0 ip
+rdr le0 from any to 9.8.7.6 port = 8888 -> 1.1.1.1 port 888 tcp
+rdr le0 from any to 9.8.7.6/255.255.255.255 port = 8888 -> 1.1.1.1 port 888 ip
+rdr le0 from any to 9.8.7.6 mask 0xffffffff port = 8888 -> 1.1.1.1 port 888 tcp
+rdr le0 from any to 9.8.7.6 mask 255.255.255.255 port = 8888 -> 1.1.1.1 port 888 udp
rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 tcp/udp
rdr le0 from any to 9.8.7.6/32 -> 1.1.1.1 port 888 icmp
rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1,1.1.1.2 port 888 tcp
diff --git a/contrib/ipfilter/test/regress/in6 b/contrib/ipfilter/test/regress/in6
index 6948799..932df9b 100644
--- a/contrib/ipfilter/test/regress/in6
+++ b/contrib/ipfilter/test/regress/in6
@@ -1,3 +1,7 @@
map foo0 from any port = 1 to any port != 0 -> 0/32 udp
+map foo0 from any port eq 1 to any port ne 0 -> 0/32 udp
map foo0 from any port < 1 to any port > 0 -> 0/32 tcp
+map foo0 from any port lt 1 to any port gt 0 -> 0/32 tcp
map foo0 from any port <= 1 to any port >= 0 -> 0/32 tcp/udp
+map foo0 from any port le 1 to any port ge 0 -> 0/32 tcp/udp
+map foo0 from any port 1 >< 20 to any port 20 <> 40 -> 0/32 tcp/udp
diff --git a/contrib/ipfilter/test/regress/n13 b/contrib/ipfilter/test/regress/n13
new file mode 100644
index 0000000..8047930
--- /dev/null
+++ b/contrib/ipfilter/test/regress/n13
@@ -0,0 +1 @@
+map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45
diff --git a/contrib/ipfilter/test/regress/n14 b/contrib/ipfilter/test/regress/n14
new file mode 100644
index 0000000..6f5d571
--- /dev/null
+++ b/contrib/ipfilter/test/regress/n14
@@ -0,0 +1 @@
+rdr gre0 0/0 port 80 -> 10.1.1.254,10.1.1.253 port 80 tcp sticky
diff --git a/contrib/ipfilter/test/regress/ni17.nat b/contrib/ipfilter/test/regress/ni17.nat
new file mode 100644
index 0000000..3da6338
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni17.nat
@@ -0,0 +1,4 @@
+rdr le0 0/0 port 80 -> 10.1.1.252 port 3128 tcp round-robin
+rdr le0 0/0 port 80 -> 10.1.2.252 port 3128 tcp round-robin
+rdr le0 0/0 port 80 -> 10.1.3.252 port 3128 tcp round-robin sticky
+rdr le0 0/0 port 80 -> 10.1.1.253,10.1.2.253 port 3128 tcp round-robin sticky
diff --git a/contrib/ipfilter/test/regress/p2.ipf b/contrib/ipfilter/test/regress/p2.ipf
index 5b58647..4cfb388 100644
--- a/contrib/ipfilter/test/regress/p2.ipf
+++ b/contrib/ipfilter/test/regress/p2.ipf
@@ -1 +1,2 @@
pass out from hash=(127.0.0.1,4.4.0.0/16) to any
+block in from hash=(127.0.0.1,4.4.0.0/16) to any
diff --git a/contrib/ipfilter/test/test.format b/contrib/ipfilter/test/test.format
index 090c8a9..f284542 100644
--- a/contrib/ipfilter/test/test.format
+++ b/contrib/ipfilter/test/test.format
@@ -1,6 +1,6 @@
#test input-format output-format
bpf-f1 text text
-bpf1 text text
+bpf1 text ipf
f1 text text
f2 text text
f3 text text
@@ -18,21 +18,29 @@ f14 text text
f15 text text
f16 text text
f17 hex hex
-i1 text text
-i2 text text
-i3 text text
-i4 text text
-i5 text text
-i6 text text
-i7 text text
-i8 text text
-i9 text text
-i10 text text
-i11 text text
-i12 text text
-i13 text text
-i14 text text
-i15 text text
+f18 text text
+f19 text text fr_statemax=3
+i1 text ipf
+i2 text ipf
+i3 text ipf
+i4 text ipf
+i5 text ipf
+i6 text ipf
+i7 text ipf
+i8 text ipf
+i9 text ipf
+i10 text ipf
+i11 text ipf
+i12 text ipf
+i13 text ipf
+i14 text ipf
+i15 text ipf
+i16 text ipf
+i17 text ipftest
+i18 text ipf
+i19 text ipf
+i20 text ipf
+i21 text ipf
in1 text text
in2 text text
in3 text text
@@ -56,6 +64,8 @@ n9 hex hex fr_update_ipid=0
n10 hex hex fr_update_ipid=0
n11 text text
n12 hex hex fr_update_ipid=0
+n13 text text
+n14 text text
ni1 hex hex fr_update_ipid=1
ni2 hex hex fr_update_ipid=1
ni3 hex hex fr_update_ipid=1
diff --git a/contrib/ipfilter/test/vfycksum.pl b/contrib/ipfilter/test/vfycksum.pl
index 9cb47f6..d23c884 100755
--- a/contrib/ipfilter/test/vfycksum.pl
+++ b/contrib/ipfilter/test/vfycksum.pl
@@ -3,6 +3,14 @@
# validate the IPv4 header checksum.
# $bytes[] is an array of 16bit values, with $cnt elements in the array.
#
+sub dump {
+ print "\n";
+ for ($i = 0; $i < $#bytes; $i++) {
+ printf "%04x ", $bytes[$i];
+ }
+ print "\n";
+}
+
sub dosum {
local($seed) = $_[0];
local($start) = $_[1];
@@ -99,7 +107,8 @@ sub tcpcheck {
}
if ($z) {
- print " TCP: missing data($x $y $z)";
+ print " TCP: missing data($x $y $z) $hl";
+# &dump();
return;
}
OpenPOWER on IntegriCloud