summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/test
diff options
context:
space:
mode:
authordarrenr <darrenr@FreeBSD.org>2004-06-21 22:47:51 +0000
committerdarrenr <darrenr@FreeBSD.org>2004-06-21 22:47:51 +0000
commitac063842a53f02c0a131cdb35e49e784a4d881ac (patch)
tree7df785743cc19948a0403c0c3e9727db4af45141 /contrib/ipfilter/test
parent2a062b2e412e60140ac4e29025acec9fd5760a03 (diff)
parent590450fec65a8e72a8965117398bc8f14938b4a8 (diff)
downloadFreeBSD-src-ac063842a53f02c0a131cdb35e49e784a4d881ac.zip
FreeBSD-src-ac063842a53f02c0a131cdb35e49e784a4d881ac.tar.gz
This commit was generated by cvs2svn to compensate for changes in r130887,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/ipfilter/test')
-rw-r--r--contrib/ipfilter/test/Makefile2
-rw-r--r--contrib/ipfilter/test/README.TXT30
-rw-r--r--contrib/ipfilter/test/expected/i111
-rw-r--r--contrib/ipfilter/test/expected/in11
-rw-r--r--contrib/ipfilter/test/expected/ni15
-rw-r--r--contrib/ipfilter/test/expected/ni105
-rw-r--r--contrib/ipfilter/test/expected/ni115
-rw-r--r--contrib/ipfilter/test/expected/ni218
-rw-r--r--contrib/ipfilter/test/expected/ni36
-rw-r--r--contrib/ipfilter/test/expected/ni46
-rw-r--r--contrib/ipfilter/test/expected/ni538
-rw-r--r--contrib/ipfilter/test/expected/ni73
-rw-r--r--contrib/ipfilter/test/expected/ni85
-rw-r--r--contrib/ipfilter/test/input/f1218
-rw-r--r--contrib/ipfilter/test/input/f1326
-rw-r--r--contrib/ipfilter/test/input/f1732
-rw-r--r--contrib/ipfilter/test/input/ni117
-rw-r--r--contrib/ipfilter/test/input/ni1019
-rw-r--r--contrib/ipfilter/test/input/ni1124
-rw-r--r--contrib/ipfilter/test/input/ni222
-rw-r--r--contrib/ipfilter/test/input/ni34
-rw-r--r--contrib/ipfilter/test/input/ni44
-rw-r--r--contrib/ipfilter/test/input/ni542
-rw-r--r--contrib/ipfilter/test/input/ni713
-rw-r--r--contrib/ipfilter/test/input/ni824
-rw-r--r--contrib/ipfilter/test/regress/i111
-rw-r--r--contrib/ipfilter/test/regress/in11
-rw-r--r--contrib/ipfilter/test/regress/ni10.ipf4
-rw-r--r--contrib/ipfilter/test/regress/ni10.nat1
-rw-r--r--contrib/ipfilter/test/regress/ni11.ipf4
-rw-r--r--contrib/ipfilter/test/regress/ni11.nat1
-rw-r--r--contrib/ipfilter/test/regress/ni7.ipf4
-rw-r--r--contrib/ipfilter/test/regress/ni7.nat1
-rw-r--r--contrib/ipfilter/test/regress/ni8.ipf1
-rw-r--r--contrib/ipfilter/test/regress/ni8.nat1
-rwxr-xr-xcontrib/ipfilter/test/vfycksum.pl264
36 files changed, 540 insertions, 113 deletions
diff --git a/contrib/ipfilter/test/Makefile b/contrib/ipfilter/test/Makefile
index c24ba46..a7a6c29 100644
--- a/contrib/ipfilter/test/Makefile
+++ b/contrib/ipfilter/test/Makefile
@@ -51,7 +51,7 @@ i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12:
n1 n2 n3 n4 n5 n6 n7:
@/bin/sh ./nattest $@
-ni1 ni2 ni3 ni4 ni5:
+ni1 ni2 ni3 ni4 ni5 ni7 ni8 ni10 ni11:
@/bin/sh ./natipftest $@
in1 in2 in3 in4:
diff --git a/contrib/ipfilter/test/README.TXT b/contrib/ipfilter/test/README.TXT
new file mode 100644
index 0000000..0b62145
--- /dev/null
+++ b/contrib/ipfilter/test/README.TXT
@@ -0,0 +1,30 @@
+The contents of this directory sub tree is dedicated to regression testing
+of IPFilter.
+
+The tests are broken down into these groups:
+f - filter rule tests
+i - parsing & printing test of ipf rules
+in - parsing & printing test of ipnat rules
+ipv6 - ipv6 filter rule tests
+l - logging test
+n - NAT testing
+ni - combined NAT & IPF tests
+
+ TEST
+f1 - block/pass, in/out.
+f2 - proto
+f3 - from IP#
+f4 - to #IP
+f5 - source port
+f6 - destination port
+f7 - icmp-type, code
+f8 - flags
+f9 - ipoptions
+f10 - ipoptions
+f11 - keep frag/state
+f12 - short/frag
+f13 - keep frag/state (fragmented packets)
+f14 - from !host, to !host
+f15 - groups
+f16 - skip
+f17 - TCP state transition on flags
diff --git a/contrib/ipfilter/test/expected/i11 b/contrib/ipfilter/test/expected/i11
index 9268c66..ddf8000 100644
--- a/contrib/ipfilter/test/expected/i11
+++ b/contrib/ipfilter/test/expected/i11
@@ -2,3 +2,4 @@ pass in on ed0(!) proto tcp from 127.0.0.1/32 to 127.0.0.1/32 port = 23 keep sta
block in log first on lo0(!) proto tcp/udp from any to any keep state
pass in proto udp from 127.0.0.1/32 to 127.0.0.1/32 port = 2049 keep frags
pass in proto udp from 127.0.0.1/32 to 127.0.0.1/32 port = 53 keep state keep frags
+pass in proto tcp from any port > 1024 to 127.0.0.1/32 port = 25 keep state
diff --git a/contrib/ipfilter/test/expected/in1 b/contrib/ipfilter/test/expected/in1
index 73e39f9..c507db7 100644
--- a/contrib/ipfilter/test/expected/in1
+++ b/contrib/ipfilter/test/expected/in1
@@ -22,3 +22,4 @@ map ppp0 192.168.0.0/16 -> 0.0.0.0/32 portmap tcp 10000:19999 age 30/30
map le0 0.0.0.0/0 -> 0.0.0.0/32 frag age 10/10
map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45 frag age 10/20
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 = ftp -> 1.2.3.4/32 proxy port ftp ftp/tcp
diff --git a/contrib/ipfilter/test/expected/ni1 b/contrib/ipfilter/test/expected/ni1
index 29eac73..724d38e 100644
--- a/contrib/ipfilter/test/expected/ni1
+++ b/contrib/ipfilter/test/expected/ni1
@@ -1,3 +1,4 @@
-4500 0028 4706 4000 0111 ced8 0606 0606 0404 0404 afc9 829e 0014 0b2d 0402 0000 3be5 468d 000a cfc3
-4500 0038 809a 0000 ff01 8f31 0303 0303 0202 0202 0b00 a537 0000 0000 4500 0028 4703 4000 0111 ef89 0202 0202 0404 0404 afc9 829e 0014 1d4f
+4500 0028 4706 4000 0111 1eac 0606 0606 0404 0404 afc9 829e 0014 6308 0402 0000 3be5 468d 000a cfc3
+4500 0038 809a 0000 ff01 3121 0303 0303 0202 0202 0b00 5773 0000 0000 4500 0028 4706 4000 0111 26b4 0202 0202 0404 0404 afc9 829e 0014 6b10
+4500 0044 809a 0000 ff01 3115 0303 0303 0202 0202 0b00 0131 0000 0000 4500 0028 4706 4000 0111 26b4 0202 0202 0404 0404 afc9 829e 0014 6b10 0402 0000 3be5 468d 000a cfc3
-------------------------------
diff --git a/contrib/ipfilter/test/expected/ni10 b/contrib/ipfilter/test/expected/ni10
new file mode 100644
index 0000000..e784581
--- /dev/null
+++ b/contrib/ipfilter/test/expected/ni10
@@ -0,0 +1,5 @@
+4500 003c 4706 4000 ff06 20a2 0404 0404 0606 0606 5000 0050 0000 0001 0000 0000 a002 16d0 d0da 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 0038 809a 0000 ff01 2f1f 0202 0202 0404 0404 0303 acab 0000 0000 4500 003c 4706 4000 ff06 28aa 0404 0404 0202 0202 5000 0050 0000 0001
+4500 0058 809a 0000 ff01 2cfd 0303 0303 0404 0404 0303 113f 0000 0000 4500 003c 4706 4000 ff06 20a2 0404 0404 0606 0606 5000 0050 0000 0001 0000 0000 a002 16d0 d0da 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 0038 809a 0000 ff01 2b1b 0303 0303 0505 0505 0303 acab 0000 0000 4500 003c 4706 4000 ff06 28ab 0404 0404 0202 0201 5000 0050 0000 0001
+-------------------------------
diff --git a/contrib/ipfilter/test/expected/ni11 b/contrib/ipfilter/test/expected/ni11
new file mode 100644
index 0000000..8cc37f4
--- /dev/null
+++ b/contrib/ipfilter/test/expected/ni11
@@ -0,0 +1,5 @@
+4500 003c 4706 4000 ff06 2aac 0404 0404 0101 0101 5000 9d58 0000 0001 0000 0000 a002 16d0 3ddc 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 0038 809a 0000 ff01 271f 0a02 0202 0404 0404 0303 a7fb 0000 0000 4500 003c 4706 4000 ff06 20aa 0404 0404 0a02 0202 5000 0500 0000 0001
+4500 0058 809a 0000 ff01 2cfd 0303 0303 0404 0404 0303 0735 0000 0000 4500 003c 4706 4000 ff06 2aac 0404 0404 0101 0101 5000 9d58 0000 0001 0000 0000 a002 16d0 3ddc 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 0038 809a 0000 ff01 2b1b 0303 0303 0505 0505 0303 0fa3 0000 0000 4500 003c 4706 4000 ff06 2aab 0404 0404 0101 0102 5000 9d58 0000 0001
+-------------------------------
diff --git a/contrib/ipfilter/test/expected/ni2 b/contrib/ipfilter/test/expected/ni2
index b849e41..bf05cf0 100644
--- a/contrib/ipfilter/test/expected/ni2
+++ b/contrib/ipfilter/test/expected/ni2
@@ -1,10 +1,10 @@
-4510 002c bd0d 4000 3e06 ea1d 0101 0101 c0a8 0133 9c40 0077 a664 2485 0000 0000 6002 4000 2ca8 0000 0204 05b4
-4500 002c ce83 4000 7e06 98b7 c0a8 0133 0a01 0201 0077 05f6 fbdf 1a21 a664 2486 6012 2238 c0a8 0000 0204 05b4
-4510 0028 bd0e 4000 3e06 ea20 0101 0101 c0a8 0133 9c40 0077 a664 2486 fbdf 1a22 5010 4470 29e3 0000
-4500 005b cf83 4000 7e06 9788 c0a8 0133 0a01 0201 0077 05f6 fbdf 1a22 a664 2486 5018 2238 ce2a 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0a
-4510 0028 bd18 4000 3e06 ea16 0101 0101 c0a8 0133 9c40 0077 a664 2486 fbdf 1a55 5010 4470 29b0 0000
-4510 002e bd1e 4000 3e06 ea0a 0101 0101 c0a8 0133 9c40 0077 a664 2486 fbdf 1a55 5018 4470 1c98 0000 0000 0000 0d0a
-4500 0048 e383 4000 7e06 839b c0a8 0133 0a01 0201 0077 05f6 fbdf 1a55 a664 248c 5018 2232 d80a 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
-4500 05dc e483 4000 7e06 7d07 c0a8 0133 0a01 0201 0077 05f6 fbdf 1a75 a664 248c 5010 2232 9f2d 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3331 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
-4500 0038 d71d 4000 4001 f0be 0101 0101 c0a8 0133 0304 348b 0000 05a0 4500 05dc e483 4000 7e06 8707 c0a8 0133 0101 0101 0077 9c40 fbdf 1a75
+4510 002c bd0d 4000 3e06 bbd1 0101 0101 c0a8 0133 9c40 0077 a664 2485 0000 0000 6002 4000 2ca8 0000 0204 05b4
+4500 002c ce83 4000 7e06 606b c0a8 0133 0a01 0201 0077 05f6 fbdf 1a21 a664 2486 6012 2238 c0a8 0000 0204 05b4
+4510 0028 bd0e 4000 3e06 bbd4 0101 0101 c0a8 0133 9c40 0077 a664 2486 fbdf 1a22 5010 4470 29e3 0000
+4500 005b cf83 4000 7e06 5f3c c0a8 0133 0a01 0201 0077 05f6 fbdf 1a22 a664 2486 5018 2238 ce2a 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0a
+4510 0028 bd18 4000 3e06 bbca 0101 0101 c0a8 0133 9c40 0077 a664 2486 fbdf 1a55 5010 4470 29b0 0000
+4510 002e bd1e 4000 3e06 bbbe 0101 0101 c0a8 0133 9c40 0077 a664 2486 fbdf 1a55 5018 4470 1c98 0000 0000 0000 0d0a
+4500 0048 e383 4000 7e06 4b4f c0a8 0133 0a01 0201 0077 05f6 fbdf 1a55 a664 248c 5018 2232 d80a 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+4500 05dc e483 4000 7e06 44bb c0a8 0133 0a01 0201 0077 05f6 fbdf 1a75 a664 248c 5010 2232 9f2d 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3331 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 1111 2222 3333 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+4500 0038 d71d 4000 4001 9fca 0101 0101 c0a8 0133 0304 444f 0000 05a0 4500 05dc e483 4000 7e06 4ebb c0a8 0133 0101 0101 0077 9c40 fbdf 1a75
-------------------------------
diff --git a/contrib/ipfilter/test/expected/ni3 b/contrib/ipfilter/test/expected/ni3
index cd0f5d9..cf535f3 100644
--- a/contrib/ipfilter/test/expected/ni3
+++ b/contrib/ipfilter/test/expected/ni3
@@ -1,4 +1,4 @@
-4500 003c 4706 4000 ff06 28aa 0606 0606 0404 0404 5000 0050 0000 0001 0000 0000 a002 16d0 d0da 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
-4500 0038 809a 0000 ff01 3323 0303 0303 0202 0202 0303 acab 0000 0000 4500 003c 4706 4000 ff06 28aa 0202 0202 0404 0404 5000 0050 0000 0001
-4500 0058 809a 0000 ff01 3303 0303 0303 0202 0202 0303 0937 0000 0000 4500 003c 4706 4000 ff06 28aa 0202 0202 0404 0404 5000 0050 0000 0001 0000 0000 a002 16d0 d8e2 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 003c 4706 4000 ff06 20a2 0606 0606 0404 0404 5000 0050 0000 0001 0000 0000 a002 16d0 d0da 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 0038 809a 0000 ff01 3121 0303 0303 0202 0202 0303 acab 0000 0000 4500 003c 4706 4000 ff06 28aa 0202 0202 0404 0404 5000 0050 0000 0001
+4500 0058 809a 0000 ff01 3101 0303 0303 0202 0202 0303 0937 0000 0000 4500 003c 4706 4000 ff06 28aa 0202 0202 0404 0404 5000 0050 0000 0001 0000 0000 a002 16d0 d8e2 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
-------------------------------
diff --git a/contrib/ipfilter/test/expected/ni4 b/contrib/ipfilter/test/expected/ni4
index bd7179f..95382cd 100644
--- a/contrib/ipfilter/test/expected/ni4
+++ b/contrib/ipfilter/test/expected/ni4
@@ -1,4 +1,4 @@
-4500 003c 4706 4000 ff06 28aa 0606 0606 0404 0404 9c40 0050 0000 0001 0000 0000 a002 16d0 849a 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
-4500 0038 809a 0000 ff01 3323 0303 0303 0202 0202 0303 acab 0000 0000 4500 003c 4706 4000 ff06 28aa 0202 0202 0404 0404 5000 0050 0000 0001
-4500 0058 809a 0000 ff01 3303 0303 0303 0202 0202 0303 0937 0000 0000 4500 003c 4706 4000 ff06 28aa 0202 0202 0404 0404 5000 0050 0000 0001 0000 0000 a002 16d0 d8e2 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 003c 4706 4000 ff06 20a2 0606 0606 0404 0404 9c40 0050 0000 0001 0000 0000 a002 16d0 849a 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 0038 809a 0000 ff01 3121 0303 0303 0202 0202 0303 acab 0000 0000 4500 003c 4706 4000 ff06 28aa 0202 0202 0404 0404 5000 0050 0000 0001
+4500 0058 809a 0000 ff01 3101 0303 0303 0202 0202 0303 0937 0000 0000 4500 003c 4706 4000 ff06 28aa 0202 0202 0404 0404 5000 0050 0000 0001 0000 0000 a002 16d0 d8e2 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
-------------------------------
diff --git a/contrib/ipfilter/test/expected/ni5 b/contrib/ipfilter/test/expected/ni5
index 74c615f..449c2c4 100644
--- a/contrib/ipfilter/test/expected/ni5
+++ b/contrib/ipfilter/test/expected/ni5
@@ -1,28 +1,28 @@
-4500 002c 10c9 4000 ff06 3289 0101 0101 96cb e002 8032 0015 bd6b c9c8 0000 0000 6002 2238 f5a2 0000 0204 05b4
+4500 002c 10c9 4000 ff06 f232 0101 0101 96cb e002 8032 0015 bd6b c9c8 0000 0000 6002 2238 f5a2 0000 0204 05b4
4500 002c ffdd 4000 ef06 5374 96cb e002 c0a8 0103 0015 8032 3786 76c4 bd6b c9c9 6012 269c 8369 0000 0204 0584
-4500 0028 10ca 4000 ff06 328c 0101 0101 96cb e002 8032 0015 bd6b c9c9 3786 76c5 5010 269c 5aa0 0000
+4500 0028 10ca 4000 ff06 f235 0101 0101 96cb e002 8032 0015 bd6b c9c9 3786 76c5 5010 269c 5aa0 0000
4500 006f ffde 4000 ef06 5330 96cb e002 c0a8 0103 0015 8032 3786 76c5 bd6b c9c9 5018 269c 967e 0000 3232 302d 636f 6f6d 6273 2e61 6e75 2e65 6475 2e61 7520 4e63 4654 5064 2053 6572 7665 7220 2866 7265 6520 6564 7563 6174 696f 6e61 6c20 6c69 6365 6e73 6529 2072 6561 6479 2e0d 0a
-4500 0028 10cb 4000 ff06 328b 0101 0101 96cb e002 8032 0015 bd6b c9c9 3786 770c 5010 269c 5a59 0000
+4500 0028 10cb 4000 ff06 f234 0101 0101 96cb e002 8032 0015 bd6b c9c9 3786 770c 5010 269c 5a59 0000
ippr_ftp_server_valid:junk after cmd[220-Maintained by RSSS and RSPAS IT Staff (previously known as Coombs Comp]
4500 00c7 ffdf 4000 ef06 52d7 96cb e002 c0a8 0103 0015 8032 3786 770c bd6b c9c9 5018 269c 1087 0000 3232 302d 0d0a 3232 302d 4d61 696e 7461 696e 6564 2062 7920 5253 5353 2061 6e64 2052 5350 4153 2049 5420 5374 6166 6620 2870 7265 7669 6f75 736c 7920 6b6e 6f77 6e20 6173 2043 6f6f 6d62 7320 436f 6d70 7574 696e 6720 556e 6974 290d 0a32 3230 2d41 6e79 2070 726f 626c 656d 7320 636f 6e74 6163 7420 6674 706d 6173 7465 7240 636f 6f6d 6273 2e61 6e75 2e65 6475 2e61 750d 0a32 3230 2d0d 0a32 3230 200d 0a
-4500 0028 10cc 4000 ff06 328a 0101 0101 96cb e002 8032 0015 bd6b c9c9 3786 77ab 5010 269c 59ba 0000
-4500 0038 10cd 4000 ff06 3279 0101 0101 96cb e002 8032 0015 bd6b c9c9 3786 77ab 5018 269c d1c5 0000 5553 4552 2061 6e6f 6e79 6d6f 7573 0d0a
+4500 0028 10cc 4000 ff06 f233 0101 0101 96cb e002 8032 0015 bd6b c9c9 3786 77ab 5010 269c 59ba 0000
+4500 0038 10cd 4000 ff06 f222 0101 0101 96cb e002 8032 0015 bd6b c9c9 3786 77ab 5018 269c d1c5 0000 5553 4552 2061 6e6f 6e79 6d6f 7573 0d0a
4500 0028 ffe0 4000 ef06 5375 96cb e002 c0a8 0103 0015 8032 3786 77ab bd6b c9d9 5010 269c 9a00 0000
4500 006c ffe1 4000 ef06 5330 96cb e002 c0a8 0103 0015 8032 3786 77ab bd6b c9d9 5018 269c b00f 0000 3333 3120 4775 6573 7420 6c6f 6769 6e20 6f6b 2c20 7365 6e64 2079 6f75 7220 636f 6d70 6c65 7465 2065 2d6d 6169 6c20 6164 6472 6573 7320 6173 2070 6173 7377 6f72 642e 0d0a
-4500 0028 10ce 4000 ff06 3288 0101 0101 96cb e002 8032 0015 bd6b c9d9 3786 77ef 5010 269c 5966 0000
-4500 0036 10cf 4000 ff06 3279 0101 0101 96cb e002 8032 0015 bd6b c9d9 3786 77ef 5018 269c 373f 0000 5041 5353 2061 7661 6c6f 6e40 0d0a
+4500 0028 10ce 4000 ff06 f231 0101 0101 96cb e002 8032 0015 bd6b c9d9 3786 77ef 5010 269c 5966 0000
+4500 0036 10cf 4000 ff06 f222 0101 0101 96cb e002 8032 0015 bd6b c9d9 3786 77ef 5018 269c 373f 0000 5041 5353 2061 7661 6c6f 6e40 0d0a
4500 005f ffe2 4000 ef06 533c 96cb e002 c0a8 0103 0015 8032 3786 77ef bd6b c9e7 5018 269c 895e 0000 3233 302d 596f 7520 6172 6520 7573 6572 2023 3420 6f66 2035 3020 7369 6d75 6c74 616e 656f 7573 2075 7365 7273 2061 6c6c 6f77 6564 2e0d 0a
-4500 0028 10d0 4000 ff06 3286 0101 0101 96cb e002 8032 0015 bd6b c9e7 3786 7826 5010 269c 5921 0000
+4500 0028 10d0 4000 ff06 f22f 0101 0101 96cb e002 8032 0015 bd6b c9e7 3786 7826 5010 269c 5921 0000
4500 0099 ffe3 4000 ef06 5301 96cb e002 c0a8 0103 0015 8032 3786 7826 bd6b c9e7 5018 269c d399 0000 3233 302d 0d0a 3233 302d 0d0a 3233 302d 4869 2e20 2057 6527 7265 2063 6c65 616e 696e 6720 7570 2e20 2041 6e79 2066 6565 6462 6163 6b20 6d6f 7374 2077 656c 636f 6d65 2e20 3130 2041 7567 2030 300d 0a32 3330 2d0d 0a32 3330 204c 6f67 6765 6420 696e 2061 6e6f 6e79 6d6f 7573 6c79 2e0d 0a
-4500 0028 10d1 4000 ff06 3285 0101 0101 96cb e002 8032 0015 bd6b c9e7 3786 7897 5010 269c 58b0 0000
-4500 0030 10d2 4000 ff06 327c 0101 0101 96cb e002 8032 0015 bd6b c9e7 3786 7897 5018 269c 86ae 0000 5459 5045 2049 0d0a
+4500 0028 10d1 4000 ff06 f22e 0101 0101 96cb e002 8032 0015 bd6b c9e7 3786 7897 5010 269c 58b0 0000
+4500 0030 10d2 4000 ff06 f225 0101 0101 96cb e002 8032 0015 bd6b c9e7 3786 7897 5018 269c 86ae 0000 5459 5045 2049 0d0a
4500 0038 ffe4 4000 ef06 5361 96cb e002 c0a8 0103 0015 8032 3786 7897 bd6b c9ef 5018 269c 5fae 0000 3230 3020 5479 7065 206f 6b61 792e 0d0a
-4500 0028 10d3 4000 ff06 3283 0101 0101 96cb e002 8032 0015 bd6b c9ef 3786 78a7 5010 269c 5898 0000
-4500 003d 10d4 4000 ff06 3269 0101 0101 96cb e002 8032 0015 bd6b c9ef 3786 78a7 5018 269c 4b67 0000 504f 5254 2031 2c31 2c31 2c31 2c31 3238 2c35 310d 0a
+4500 0028 10d3 4000 ff06 f22c 0101 0101 96cb e002 8032 0015 bd6b c9ef 3786 78a7 5010 269c 5898 0000
+4500 003d 10d4 4000 ff06 f216 0101 0101 96cb e002 8032 0015 bd6b c9ef 3786 78a7 5018 269c 4b67 0000 504f 5254 2031 2c31 2c31 2c31 2c31 3238 2c35 310d 0a
4500 0046 ffe5 4000 ef06 5352 96cb e002 c0a8 0103 0015 8032 3786 78a7 bd6b ca0c 5018 269c dbc3 0000 3230 3020 504f 5254 2063 6f6d 6d61 6e64 2073 7563 6365 7373 6675 6c2e 0d0a
-4500 0030 10d5 4000 ff06 3279 0101 0101 96cb e002 8032 0015 bd6b ca04 3786 78c5 5018 269c 866b 0000 5459 5045 2041 0d0a
+4500 0030 10d5 4000 ff06 f222 0101 0101 96cb e002 8032 0015 bd6b ca04 3786 78c5 5018 269c 866b 0000 5459 5045 2041 0d0a
4500 0038 ffe6 4000 ef06 535f 96cb e002 c0a8 0103 0015 8032 3786 78c5 bd6b ca14 5018 269c 5f5b 0000 3230 3020 5479 7065 206f 6b61 792e 0d0a
-4500 002e 10d6 4000 ff06 327a 0101 0101 96cb e002 8032 0015 bd6b ca0c 3786 78d5 5018 269c a994 0000 4e4c 5354 0d0a
+4500 002e 10d6 4000 ff06 f223 0101 0101 96cb e002 8032 0015 bd6b ca0c 3786 78d5 5018 269c a994 0000 4e4c 5354 0d0a
4500 002c ffe7 4000 ef06 536a 96cb e002 c0a8 0103 0014 8033 d9f8 11d4 0000 0000 6002 2238 d190 0000 0204 0584
4500 002c 10d7 4000 ff06 327b c0a8 0103 96cb e002 8033 0014 bd78 5c12 d9f8 11d5 6012 02f8 d734 0000 0204 0584
4500 0028 ffe8 4000 ef06 536d 96cb e002 c0a8 0103 0014 8033 d9f8 11d5 bd78 5c13 5010 269c cb1d 0000
@@ -34,14 +34,14 @@ ippr_ftp_server_valid:junk after cmd[220-Maintained by RSSS and RSPAS IT Staff (
4500 0028 10da 4000 ff06 327c c0a8 0103 96cb e002 8033 0014 bd78 5c13 d9f8 1211 5010 6348 8e35 0000
4500 0028 10db 4000 ff06 327b c0a8 0103 96cb e002 8033 0014 bd78 5c13 d9f8 1211 5011 6348 8e34 0000
4500 0028 ffec 4000 ef06 5369 96cb e002 c0a8 0103 0014 8033 d9f8 1211 bd78 5c14 5010 269c cae0 0000
-4500 0028 10dc 4000 ff06 327a 0101 0101 96cb e002 8032 0015 bd6b ca12 3786 790a 5010 269c 5812 0000
+4500 0028 10dc 4000 ff06 f223 0101 0101 96cb e002 8032 0015 bd6b ca12 3786 790a 5010 269c 5812 0000
4500 0040 ffed 4000 ef06 5350 96cb e002 c0a8 0103 0015 8032 3786 790a bd6b ca1a 5018 269c 7c9e 0000 3232 3620 4c69 7374 696e 6720 636f 6d70 6c65 7465 642e 0d0a
-4500 0030 10dd 4000 ff06 3271 0101 0101 96cb e002 8032 0015 bd6b ca12 3786 7922 5018 269c 85f8 0000 5459 5045 2049 0d0a
+4500 0030 10dd 4000 ff06 f21a 0101 0101 96cb e002 8032 0015 bd6b ca12 3786 7922 5018 269c 85f8 0000 5459 5045 2049 0d0a
4500 0038 ffee 4000 ef06 5357 96cb e002 c0a8 0103 0015 8032 3786 7922 bd6b ca22 5018 269c 5ef0 0000 3230 3020 5479 7065 206f 6b61 792e 0d0a
-4500 0028 10de 4000 ff06 3278 0101 0101 96cb e002 8032 0015 bd6b ca1a 3786 7932 5010 269c 57e2 0000
-4500 002e 10df 4000 ff06 3271 0101 0101 96cb e002 8032 0015 bd6b ca1a 3786 7932 5018 269c b020 0000 5155 4954 0d0a
+4500 0028 10de 4000 ff06 f221 0101 0101 96cb e002 8032 0015 bd6b ca1a 3786 7932 5010 269c 57e2 0000
+4500 002e 10df 4000 ff06 f21a 0101 0101 96cb e002 8032 0015 bd6b ca1a 3786 7932 5018 269c b020 0000 5155 4954 0d0a
4500 0036 ffef 4000 ef06 5358 96cb e002 c0a8 0103 0015 8032 3786 7932 bd6b ca28 5018 269c a93c 0000 3232 3120 476f 6f64 6279 652e 0d0a
-4500 0028 10e0 4000 ff06 3276 0101 0101 96cb e002 8032 0015 bd6b ca20 3786 7940 5011 269c 57cd 0000
+4500 0028 10e0 4000 ff06 f21f 0101 0101 96cb e002 8032 0015 bd6b ca20 3786 7940 5011 269c 57cd 0000
4500 0028 fff0 4000 ef06 5365 96cb e002 c0a8 0103 0015 8032 3786 7940 bd6b ca28 5011 269c 981b 0000
4500 0028 10e1 4000 ff06 3275 c0a8 0103 96cb e002 8032 0015 bd6b ca25 3786 7941 5010 269c 981e 0000
4500 0028 fff1 4000 ef06 5364 96cb e002 c0a8 0103 0015 8032 3786 7941 bd6b ca29 5010 269c 981a 0000
diff --git a/contrib/ipfilter/test/expected/ni7 b/contrib/ipfilter/test/expected/ni7
new file mode 100644
index 0000000..d03ec58
--- /dev/null
+++ b/contrib/ipfilter/test/expected/ni7
@@ -0,0 +1,3 @@
+4500 0028 4706 4000 0111 1eac 0404 0404 0606 0606 afc9 829e 0014 6308 0402 0000 3be5 468d 000a cfc3
+4500 0038 809a 0000 ff01 2f1f 0202 0202 0404 0404 0b00 f91c 0000 0000 4500 0028 4706 4000 0111 26b4 0404 0404 0202 0202 afc9 829e 0014 c966
+-------------------------------
diff --git a/contrib/ipfilter/test/expected/ni8 b/contrib/ipfilter/test/expected/ni8
new file mode 100644
index 0000000..ebee8bc
--- /dev/null
+++ b/contrib/ipfilter/test/expected/ni8
@@ -0,0 +1,5 @@
+4500 003c 4706 4000 ff06 2aac 0404 0404 0101 0101 5000 9d58 0000 0001 0000 0000 a002 16d0 3ddc 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 0038 809a 0000 ff01 271f 0a02 0202 0404 0404 0303 a7fb 0000 0000 4500 003c 4706 4000 ff06 20aa 0404 0404 0a02 0202 5000 0500 0000 0001
+4500 0058 809a 0000 ff01 26ff 0a02 0202 0404 0404 0303 1137 0000 0000 4500 003c 4706 4000 ff06 20aa 0404 0404 0a02 0202 5000 0500 0000 0001 0000 0000 a002 16d0 cc32 0000 0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+4500 0038 809a 0000 ff01 2b1b 0303 0303 0505 0505 0303 0fa3 0000 0000 4500 003c 4706 4000 ff06 2aab 0404 0404 0101 0102 5000 9d58 0000 0001
+-------------------------------
diff --git a/contrib/ipfilter/test/input/f12 b/contrib/ipfilter/test/input/f12
index 5d9c1de..682202f 100644
--- a/contrib/ipfilter/test/input/f12
+++ b/contrib/ipfilter/test/input/f12
@@ -1,35 +1,35 @@
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF SYN
-45 00 0028 0000 4000 3f 06 0000 01010101 02010101
+45 00 0028 0000 4000 3f 06 36cd 01010101 02010101
0401 0019 00000000 00000000 50 02 2000 0000 0000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF ACK
-45 00 0028 0000 4000 3f 06 0000 01010101 02010101
+45 00 0028 0000 4000 3f 06 36cd 01010101 02010101
0401 0019 00000000 00000000 50 10 2000 0000 0000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF MF FO=0 ACK
-45 00 0028 0000 6000 3f 06 0000 01010101 02010101
+45 00 0028 0000 6000 3f 06 16cd 01010101 02010101
0401 0019 00000000 00000000 50 10 2000 0000 0000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF FO=0
-45 00 001c 0000 6000 3f 06 0000 01010101 02010101
+45 00 001c 0000 6000 3f 06 16d9 01010101 02010101
0401 0019 00000000
# 1.1.1.1 -> 2.1.1.1 TTL=63 TCP DF FO=1 ACK
-45 00 001c 0000 6001 3f 06 0000 01010101 02010101
+45 00 001c 0000 6001 3f 06 16d8 01010101 02010101
00000000 50 10 2000
# 1.1.1.1 -> 2.1.1.1 TTL=63 UDP DF MF FO=0
-45 00 0014 0000 6000 3f 11 0000 01010101 02010101
+45 00 0014 0000 6000 3f 11 16d6 01010101 02010101
# 1.1.1.1,53 -> 2.1.1.1,53 TTL=63 UDP MF FO=0
-45 00 0018 0000 2000 3f 11 0000 01010101 02010101
+45 00 0018 0000 2000 3f 11 56d2 01010101 02010101
0035 0035
# 1.1.1.1,1 -> 2.1.1.1,1 TTL=63 UDP MF FO=0
-45 00 001c 0000 2000 3f 11 0000 01010101 02010101
+45 00 001c 0000 2000 3f 11 56ce 01010101 02010101
0001 0001 0004 0000
# 1.1.1.1,53 -> 2.1.1.1,53 TTL=63 UDP MF FO=0
-45 00 001c 0000 2000 3f 11 0000 01010101 02010101
+45 00 001c 0000 2000 3f 11 56ce 01010101 02010101
0035 0035 0004 0000
diff --git a/contrib/ipfilter/test/input/f13 b/contrib/ipfilter/test/input/f13
index ccd74a3..d1c04d8 100644
--- a/contrib/ipfilter/test/input/f13
+++ b/contrib/ipfilter/test/input/f13
@@ -1,51 +1,51 @@
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF,MF,FO=0 SYN
-45 00 0028 0001 4000 3f 06 0000 01010101 02010101
+45 00 0028 0001 4000 3f 06 36cc 01010101 02010101
0401 0019 00000000 00000000 50 02 2000 0000 0000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP MF ACK
-45 00 0024 0002 2000 3f 06 0000 01010101 02010101
+45 00 0024 0002 2000 3f 06 56cf 01010101 02010101
0401001900000000 0000000050102000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP FO=2 ACK
-45 00 002c 0002 0002 3f 06 0000 01010101 02010101
+45 00 002c 0002 0002 3f 06 76c5 01010101 02010101
0000000000010203 0405060708090a0b 0c0d0e0f10111213
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF MF FO=0 SYN
-45 00 0028 0003 6000 3f 06 0000 01010101 02010101
+45 00 0028 0003 6000 3f 06 16ca 01010101 02010101
0401 0019 00000000 00000000 50 10 2000 0000 0000
# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF FO=0
-45 00 001c 0004 6000 3f 06 0000 01010101 02010101
+45 00 001c 0004 6000 3f 06 16d5 01010101 02010101
0401 0019 00000000
# 1.1.1.1 -> 2.1.1.1 TTL=63 TCP DF FO=1 SYN
-45 00 001c 0005 6001 3f 06 0000 01010101 02010101
+45 00 001c 0005 6001 3f 06 16d3 01010101 02010101
00000000 50 10 2000
# 1.1.1.1 -> 2.1.1.1 TTL=63 UDP DF MF FO=0
-45 00 0014 0006 6000 3f 11 0000 01010101 02010101
+45 00 0014 0006 6000 3f 11 16d0 01010101 02010101
# 1.1.1.1,53 -> 2.1.1.1,53 TTL=63 UDP MF FO=0
-45 00 0018 0007 2000 3f 11 0000 01010101 02010101
+45 00 0018 0007 2000 3f 11 56cb 01010101 02010101
0035 0035
# 1.1.1.1,53 -> 2.1.1.1,53 TTL=63 UDP MF FO=0
-45 00 001c 0008 2000 3f 11 0000 01010101 02010101
+45 00 001c 0008 2000 3f 11 56c6 01010101 02010101
0035003500040000
# 1.1.1.1,53 -> 2.1.1.1,54 TTL=63 UDP MF FO=0 (short)
-45 00 0018 0008 2000 3f 11 0000 01010101 02010101
+45 00 0018 0008 2000 3f 11 56ca 01010101 02010101
00350036
# 1.1.1.1,21 -> 2.1.1.1,54 TTL=63 UDP MF FO=0
-45 00 001c 0008 2000 3f 11 0000 01010101 02010101
+45 00 001c 0008 2000 3f 11 56c6 01010101 02010101
0015003600040000
# 1.1.1.1,21 -> 2.1.1.1,54 TTL=63 TCP MF FO=0
-45 00 001c 0008 2000 3f 06 0000 01010101 02010101
+45 00 001c 0008 2000 3f 06 56d1 01010101 02010101
0015 0036 00000000 00000000 50 02 2000 0000 0000
# 1.1.1.1 -> 2.1.1.1 TTL=63 UDP FO=1
-45 00 001c 0008 0001 3f 11 0000 01010101 02010101
+45 00 001c 0008 0001 3f 11 76c5 01010101 02010101
0000000000000000
diff --git a/contrib/ipfilter/test/input/f17 b/contrib/ipfilter/test/input/f17
index 7ab1aab..1eba7e7 100644
--- a/contrib/ipfilter/test/input/f17
+++ b/contrib/ipfilter/test/input/f17
@@ -1,61 +1,61 @@
# (1.1.1.1,54076,seq=0xbfd08989) -> (2.2.2.2,25,seq=0) SYN
[out,ppp0]
-4500 003c 8262 0000 4006 8417 0101 0101
+4500 003c 8262 0000 4006 f254 0101 0101
0202 0202 d33c 0019 bfd0 8989 0000 0000
-a002 4000 6190 0000 0204 05b4 0103 0300
+a002 4000 cfcd 0000 0204 05b4 0103 0300
0101 080a 008e 17f7 0000 0000
# (2.2.2.2,25,seq=0x40203436) -> (1.1.1.1,54076,seq=0xbfdfcbc9) ACK
[in,ppp0]
-4500 003c 8262 0000 1106 b317 0202 0202
+4500 003c 8262 0000 1106 2155 0202 0202
0101 0101 0019 d33c 4020 3436 bfdf cbc9
-5010 4000 fb0c 0000 0204 0584 0103 0300
+5010 4000 694a 0000 0204 0584 0103 0300
0101 080a 008e 17f7 0000 0000
# (1.1.1.1,54076,seq=0xbfd08989) -> (2.2.2.2,25,seq=0x0) SYN
[out,ppp0]
-4500 003c 8265 0000 4006 8414 0101 0101
+4500 003c 8265 0000 4006 f251 0101 0101
0202 0202 d33c 0019 bfd0 8989 0000 0000
-a002 4000 6185 0000 0204 05b4 0103 0300
+a002 4000 cfc2 0000 0204 05b4 0103 0300
0101 080a 008e 1802 0000 0000
# (2.2.2.2,25,seq=0xed674d4e) -> (1.1.1.1,54076,seq=0xbfd0898a) SYN-ACK
[in,ppp0]
-4500 002c 7442 4000 2906 6947 0202 0202
+4500 002c 7442 4000 2906 d784 0202 0202
0101 0101 0019 d33c ed67 4d4e bfd0 898a
-6012 2118 ab84 0000 0204 0584
+6012 2118 19c2 0000 0204 0584
#
# (2.2.2.2,25,seq=0xbfd0898a) -> (1.1.1.1,54076,seq=0xed674d4e) ACK
[out,ppp0]
-4500 002c 8262 0000 4006 8417 0101 0101
+4500 002c 8262 0000 4006 f264 0101 0101
0202 0202 d33c 0019 bfd0 898a ed67 4d4e
5010 4000 6190 0000 0000
# (1.1.1.1,54076,seq=0xcfd08989) -> (2.2.2.2,25,seq=0x0) SYN
[out,ppp0]
-4500 003c 8265 0000 4006 8414 0101 0101
+4500 003c 8265 0000 4006 f251 0101 0101
0202 0202 d33c 0019 cfd0 8989 0000 0000
-a002 4000 6185 0000 0204 05b4 0103 0300
+a002 4000 bfc2 0000 0204 05b4 0103 0300
0101 080a 008e 1802 0000 0000
# (1.1.1.1,54076,seq=0xcfd08989) -> (2.2.2.2,25,seq=0x0) SYN
[out,ppp0]
-4500 003c 8266 0000 4006 8413 0101 0101
+4500 003c 8266 0000 4006 f250 0101 0101
0202 0202 d33c 0019 cfd0 8989 0000 0000
-a002 4000 6185 0000 0204 05b4 0103 0300
+a002 4000 bfc2 0000 0204 05b4 0103 0300
0101 080a 008e 1802 0000 0000
# (2.2.2.2,25,seq=0xed674d4e) -> (1.1.1.1,54076,seq=0xcfd0898a) SYN-ACK
[in,ppp0]
-4500 002c 7442 4000 2906 6947 0202 0202
+4500 002c 7442 4000 2906 d784 0202 0202
0101 0101 0019 d33c ed67 4d4e cfd0 898a
-6012 2118 ab84 0000 0204 0584
+6012 2118 09c2 0000 0204 0584
#
# (2.2.2.2,25,seq=0xcfd0898a) -> (1.1.1.1,54076,seq=0xed674d4e) ACK
[out,ppp0]
-4500 002c 8262 0000 4006 8417 0101 0101
+4500 002c 8262 0000 4006 f264 0101 0101
0202 0202 d33c 0019 cfd0 898a ed67 4d4e
5010 4000 6190 0000 0000
diff --git a/contrib/ipfilter/test/input/ni1 b/contrib/ipfilter/test/input/ni1
index a099f80..dc2f05e 100644
--- a/contrib/ipfilter/test/input/ni1
+++ b/contrib/ipfilter/test/input/ni1
@@ -1,6 +1,19 @@
#v tos len id off ttl p sum src dst
# ICMP timeout exceeded in reply to a ICMP packet going out.
-[out,df0] 45 00 0028 4706 4000 01 11 ced8 0202 0202 0404 0404 afc9 829e 0014 1335 0402 0000 3be5 468d 000a cfc3
+[out,df0]
+4500 0028 4706 4000 0111 26b4 0202 0202
+0404 0404 afc9 829e 0014 6b10 0402 0000
+3be5 468d 000a cfc3
-[in,df0] 45 00 0038 809a 0000 ff 01 8f31 0303 0303 0101 0101 0b00 ad3f 0000 0000 4500 0028 4703 4000 0111 e781 0606 0606 0404 0404 afc9 829e 0014 1547
+[in,df0]
+4500 0038 809a 0000 ff01 2919 0303 0303
+0606 0606 0b00 5f7b 0000 0000
+4500 0028 4706 4000 0111 1eac 0606 0606 0404 0404
+afc9 829e 0014 6308
+
+[in,df0]
+4500 0044 809a 0000 ff01 290d 0303 0303
+0606 0606 0b00 0939 0000 0000
+4500 0028 4706 4000 0111 1eac 0606 0606 0404 0404
+afc9 829e 0014 6308 0402 0000 3be5 468d 000a cfc3
diff --git a/contrib/ipfilter/test/input/ni10 b/contrib/ipfilter/test/input/ni10
new file mode 100644
index 0000000..041326f
--- /dev/null
+++ b/contrib/ipfilter/test/input/ni10
@@ -0,0 +1,19 @@
+#v tos len id off ttl p sum src dst
+# ICMP dest unreachable with 64 bits in payload (in reply to a TCP packet
+# going out)
+[in,df0] 45 00 00 3c 47 06 40 00 ff 06 28 aa 04 04 04 04 02 02 02 02 50 00 00 50 00 00 00 01 00 00 00 00 a0 02 16 d0 d8 e2 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
+
+[out,df0]
+4500 0038 809a 0000 ff01 2d1d 0303 0303 0404 0404
+0303 acab 0000 0000
+4500 003c 4706 4000 ff06 20a2 0404 0404 0606 0606
+5000 0050 0000 0001
+
+# ICMP dest unreachable with whole packet in payload (40 bytes = 320 bits)
+[out,df0] 45 00 00 58 80 9a 00 00 ff 01 2c fd 03 03 03 03 04 04 04 04 03 03 11 3f 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 04 04 04 04 06 06 06 06 50 00 00 50 00 00 00 01 00 00 00 00 a0 02 16 d0 d0 da 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
+
+[out,df0]
+4500 0038 809a 0000 ff01 2b1b 0303 0303 0505 0505
+0303 acab 0000 0000
+4500 003c 4706 4000 ff06 28ab 0404 0404 0202 0201 5000 0050 0000 0001
+
diff --git a/contrib/ipfilter/test/input/ni11 b/contrib/ipfilter/test/input/ni11
new file mode 100644
index 0000000..788e603
--- /dev/null
+++ b/contrib/ipfilter/test/input/ni11
@@ -0,0 +1,24 @@
+#v tos len id off ttl p sum src dst
+# ICMP dest unreachable with 64 bits in payload (in reply to a TCP packet
+# going out)
+[in,df0] 45 00 00 3c 47 06 40 00 ff 06 20 aa 04 04 04 04 0a 02 02 02 50 00 05 00 00 00 00 01 00 00 00 00 a0 02 16 d0 cc 32 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
+
+[out,df0]
+4500 0038 809a 0000 ff01 2d1d 0303 0303 0404 0404
+0303 0fa3 0000 0000
+4500 003c 4706 4000 ff06 2aac 0404 0404 0101 0101
+5000 9d58 0000 0001
+
+# ICMP dest unreachable with whole packet in payload (40 bytes = 320 bits)
+[out,df0]
+4500 0058 809a 0000 ff01 2cfd 0303 0303 0404 0404
+0303 0735 0000 0000
+4500 003c 4706 4000 ff06 2aac 0404 0404 0101 0101
+5000 9d58 0000 0001 0000 0000 a002 16d0 3ddc 0000
+0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+
+[out,df0]
+4500 0038 809a 0000 ff01 2b1b 0303 0303 0505 0505
+0303 0fa3 0000 0000
+4500 003c 4706 4000 ff06 2aab 0404 0404 0101 0102 5000 9d58 0000 0001
+
diff --git a/contrib/ipfilter/test/input/ni2 b/contrib/ipfilter/test/input/ni2
index 3f7dbcb..b16cd02 100644
--- a/contrib/ipfilter/test/input/ni2
+++ b/contrib/ipfilter/test/input/ni2
@@ -1,27 +1,27 @@
# Test of fragmentation required coming from the inside.
[out,xl0]
-4510 002c bd0d 4000 3e06 ea1d
+4510 002c bd0d 4000 3e06 b1d1
0a01 0201
c0a8 0133
05f6 0077 a664 2485 0000 0000
6002 4000 b8f2 0000 0204 05b4
[in,xl0]
-4500 002c ce83 4000 7e06 98b7
+4500 002c ce83 4000 7e06 606b
c0a8 0133
0a01 0201
0077 05f6 fbdf 1a21 a664 2486
6012 2238 c0a8 0000 0204 05b4 0000
[out,xl0]
-4510 0028 bd0e 4000 3e06 ea20
+4510 0028 bd0e 4000 3e06 b1d4
0a01 0201
c0a8 0133
05f6 0077 a664 2486 fbdf 1a22
5010 4470 b62d 0000
[in,xl0]
-4500 005b cf83 4000 7e06 9788
+4500 005b cf83 4000 7e06 5f3c
c0a8 0133
0a01 0201
0077 05f6 fbdf 1a22 a664 2486
@@ -31,21 +31,21 @@ c0a8 0133
0000 0000 0000 0000 0000 0a
[out,xl0]
-4510 0028 bd18 4000 3e06 ea16
+4510 0028 bd18 4000 3e06 b1ca
0a01 0201
c0a8 0133
05f6 0077 a664 2486 fbdf 1a55
5010 4470 b5fa 0000
[out,xl0]
-4510 002e bd1e 4000 3e06 ea0a
+4510 002e bd1e 4000 3e06 b1be
0a01 0201
c0a8 0133
05f6 0077 a664 2486 fbdf 1a55
5018 4470 a8e2 0000 0000 0000 0d0a
[in,xl0]
-4500 0048 e383 4000 7e06 839b
+4500 0048 e383 4000 7e06 4b4f
c0a8 0133
0a01 0201
0077 05f6 fbdf 1a55 a664 248c
@@ -54,7 +54,7 @@ c0a8 0133
0000 0000 0000 0000
[in,xl0]
-4500 05dc e483 4000 7e06 7d07
+4500 05dc e483 4000 7e06 44bb
c0a8 0133
0a01 0201
0077 05f6 fbdf 1a75 a664 248c
@@ -152,10 +152,10 @@ c0a8 0133
0000 0000 0000 0000 0000 0000
[out,xl0]
-4500 0038 d71d 4000 4001 ce16
+4500 0038 d71d 4000 4001 7d22
c0a8 6401
c0a8 0133
-0304 cad5 0000 05a0 4500 05dc
-e483 4000 7e06 7d07 c0a8 0133 0a01 0201
+0304 da99 0000 05a0 4500 05dc
+e483 4000 7e06 44bb c0a8 0133 0a01 0201
0077 05f6 fbdf 1a75
diff --git a/contrib/ipfilter/test/input/ni3 b/contrib/ipfilter/test/input/ni3
index 44aa663..feb4b29 100644
--- a/contrib/ipfilter/test/input/ni3
+++ b/contrib/ipfilter/test/input/ni3
@@ -3,8 +3,8 @@
# going out)
[out,df0] 45 00 00 3c 47 06 40 00 ff 06 28 aa 02 02 02 02 04 04 04 04 50 00 00 50 00 00 00 01 00 00 00 00 a0 02 16 d0 d8 e2 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
-[in,df0] 45 00 00 38 80 9a 00 00 ff 01 33 23 03 03 03 03 01 01 01 01 03 03 ac ab 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 06 06 06 06 04 04 04 04 50 00 00 50 00 00 00 01
+[in,df0] 45 00 00 38 80 9a 00 00 ff 01 29 19 03 03 03 03 06 06 06 06 03 03 ac ac 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 06 06 06 06 04 04 04 04 50 00 00 50 00 00 00 01
# ICMP dest unreachable with whole packet in payload (40 bytes = 320 bits)
-[in,df0] 45 00 00 58 80 9a 00 00 ff 01 33 03 03 03 03 03 01 01 01 01 03 03 11 3f 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 06 06 06 06 04 04 04 04 50 00 00 50 00 00 00 01 00 00 00 00 a0 02 16 d0 d0 da 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
+[in,df0] 45 00 00 58 80 9a 00 00 ff 01 28 f9 03 03 03 03 06 06 06 06 03 03 11 3f 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 06 06 06 06 04 04 04 04 50 00 00 50 00 00 00 01 00 00 00 00 a0 02 16 d0 d0 da 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
diff --git a/contrib/ipfilter/test/input/ni4 b/contrib/ipfilter/test/input/ni4
index 445d7c8..b2be550 100644
--- a/contrib/ipfilter/test/input/ni4
+++ b/contrib/ipfilter/test/input/ni4
@@ -3,8 +3,8 @@
# going out)
[out,df0] 45 00 00 3c 47 06 40 00 ff 06 28 aa 02 02 02 02 04 04 04 04 50 00 00 50 00 00 00 01 00 00 00 00 a0 02 16 d0 d8 e2 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
-[in,df0] 45 00 00 38 80 9a 00 00 ff 01 33 23 03 03 03 03 01 01 01 01 03 03 60 6b 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 06 06 06 06 04 04 04 04 9c 40 00 50 00 00 00 01
+[in,df0] 45 00 00 38 80 9a 00 00 ff 01 29 19 03 03 03 03 06 06 06 06 03 03 60 6c 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 06 06 06 06 04 04 04 04 9c 40 00 50 00 00 00 01
# ICMP dest unreachable with whole packet in payload (40 bytes = 320 bits)
-[in,df0] 45 00 00 58 80 9a 00 00 ff 01 33 03 03 03 03 03 01 01 01 01 03 03 11 3f 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 06 06 06 06 04 04 04 04 9c 40 00 50 00 00 00 01 00 00 00 00 a0 02 16 d0 84 9a 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
+[in,df0] 45 00 00 58 80 9a 00 00 ff 01 28 f9 03 03 03 03 06 06 06 06 03 03 11 3f 00 00 00 00 45 00 00 3c 47 06 40 00 ff 06 20 a2 06 06 06 06 04 04 04 04 9c 40 00 50 00 00 00 01 00 00 00 00 a0 02 16 d0 84 9a 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
diff --git a/contrib/ipfilter/test/input/ni5 b/contrib/ipfilter/test/input/ni5
index b6ff31a..a8aec23 100644
--- a/contrib/ipfilter/test/input/ni5
+++ b/contrib/ipfilter/test/input/ni5
@@ -4,7 +4,7 @@
6002 2238 35f9 0000 0204 05b4
[in,ppp0]
-4500 002c ffdd 4000 ef06 5374 96cb e002
+4500 002c ffdd 4000 ef06 131e 96cb e002
0101 0101 0015 8032 3786 76c4 bd6b c9c9
6012 269c 4313 0000 0204 0584
@@ -14,7 +14,7 @@
5010 269c 9af6 0000
[in,ppp0]
-4500 006f ffde 4000 ef06 5330 96cb e002
+4500 006f ffde 4000 ef06 12da 96cb e002
0101 0101 0015 8032 3786 76c5 bd6b c9c9
5018 269c 5628 0000 3232 302d 636f 6f6d
6273 2e61 6e75 2e65 6475 2e61 7520 4e63
@@ -28,7 +28,7 @@
5010 269c 9aaf 0000
[in,ppp0]
-4500 00c7 ffdf 4000 ef06 52d7 96cb e002
+4500 00c7 ffdf 4000 ef06 1281 96cb e002
0101 0101 0015 8032 3786 770c bd6b c9c9
5018 269c d030 0000 3232 302d 0d0a 3232
302d 4d61 696e 7461 696e 6564 2062 7920
@@ -54,12 +54,12 @@
6e79 6d6f 7573 0d0a
[in,ppp0]
-4500 0028 ffe0 4000 ef06 5375 96cb e002
+4500 0028 ffe0 4000 ef06 131f 96cb e002
0101 0101 0015 8032 3786 77ab bd6b c9d9
5010 269c 59aa 0000
[in,ppp0]
-4500 006c ffe1 4000 ef06 5330 96cb e002
+4500 006c ffe1 4000 ef06 12da 96cb e002
0101 0101 0015 8032 3786 77ab bd6b c9d9
5018 269c 6fb9 0000 3333 3120 4775 6573
7420 6c6f 6769 6e20 6f6b 2c20 7365 6e64
@@ -79,7 +79,7 @@
6c6f 6e40 0d0a
[in,ppp0]
-4500 005f ffe2 4000 ef06 533c 96cb e002
+4500 005f ffe2 4000 ef06 12e6 96cb e002
0101 0101 0015 8032 3786 77ef bd6b c9e7
5018 269c 4908 0000 3233 302d 596f 7520
6172 6520 7573 6572 2023 3420 6f66 2035
@@ -92,7 +92,7 @@
5010 269c 9977 0000
[in,ppp0]
-4500 0099 ffe3 4000 ef06 5301 96cb e002
+4500 0099 ffe3 4000 ef06 12ab 96cb e002
0101 0101 0015 8032 3786 7826 bd6b c9e7
5018 269c 9343 0000 3233 302d 0d0a 3233
302d 0d0a 3233 302d 4869 2e20 2057 6527
@@ -114,7 +114,7 @@
5018 269c c704 0000 5459 5045 2049 0d0a
[in,ppp0]
-4500 0038 ffe4 4000 ef06 5361 96cb e002
+4500 0038 ffe4 4000 ef06 130b 96cb e002
0101 0101 0015 8032 3786 7897 bd6b c9ef
5018 269c 1f58 0000 3230 3020 5479 7065
206f 6b61 792e 0d0a
@@ -132,7 +132,7 @@
0a
[in,ppp0]
-4500 0046 ffe5 4000 ef06 5352 96cb e002
+4500 0046 ffe5 4000 ef06 12fc 96cb e002
0101 0101 0015 8032 3786 78a7 bd6b ca08
5018 269c 9b71 0000 3230 3020 504f 5254
2063 6f6d 6d61 6e64 2073 7563 6365 7373
@@ -144,7 +144,7 @@
5018 269c c6bd 0000 5459 5045 2041 0d0a
[in,ppp0]
-4500 0038 ffe6 4000 ef06 535f 96cb e002
+4500 0038 ffe6 4000 ef06 1309 96cb e002
0101 0101 0015 8032 3786 78c5 bd6b ca10
5018 269c 1f09 0000 3230 3020 5479 7065
206f 6b61 792e 0d0a
@@ -155,7 +155,7 @@
5018 269c e9e6 0000 4e4c 5354 0d0a
[in,ppp0]
-4500 002c ffe7 4000 ef06 536a 96cb e002
+4500 002c ffe7 4000 ef06 1314 96cb e002
0101 0101 0014 8033 d9f8 11d4 0000 0000
6002 2238 913a 0000 0204 0584
@@ -165,12 +165,12 @@
6012 02f8 d734 0000 0204 0584
[in,ppp0]
-4500 0028 ffe8 4000 ef06 536d 96cb e002
+4500 0028 ffe8 4000 ef06 1317 96cb e002
0101 0101 0014 8033 d9f8 11d5 bd78 5c13
5010 269c 8ac7 0000
[in,ppp0]
-4500 005d ffe9 4000 ef06 5337 96cb e002
+4500 005d ffe9 4000 ef06 12e1 96cb e002
0101 0101 0015 8032 3786 78d5 bd6b ca16
5018 269c ae7e 0000 3135 3020 4f70 656e
696e 6720 4153 4349 4920 6d6f 6465 2064
@@ -183,7 +183,7 @@
5010 6348 8e71 0000
[in,ppp0]
-4500 0063 ffea 4000 ef06 5330 96cb e002
+4500 0063 ffea 4000 ef06 12da 96cb e002
0101 0101 0014 8033 d9f8 11d5 bd78 5c13
5018 269c 62bf 0000 636f 6f6d 6273 7061
7065 7273 0d0a 6465 7074 730d 0a66 6f75
@@ -197,7 +197,7 @@
5010 6348 8e36 0000
[in,ppp0]
-4500 0028 ffeb 4000 ef06 536a 96cb e002
+4500 0028 ffeb 4000 ef06 1314 96cb e002
0101 0101 0014 8033 d9f8 1210 bd78 5c13
5011 269c 8a8b 0000
@@ -212,7 +212,7 @@
5011 6348 8e34 0000
[in,ppp0]
-4500 0028 ffec 4000 ef06 5369 96cb e002
+4500 0028 ffec 4000 ef06 1313 96cb e002
0101 0101 0014 8033 d9f8 1211 bd78 5c14
5010 269c 8a8a 0000
@@ -222,7 +222,7 @@
5010 269c 9864 0000
[in,ppp0]
-4500 0040 ffed 4000 ef06 5350 96cb e002
+4500 0040 ffed 4000 ef06 12fa 96cb e002
0101 0101 0015 8032 3786 790a bd6b ca16
5018 269c 3c4c 0000 3232 3620 4c69 7374
696e 6720 636f 6d70 6c65 7465 642e 0d0a
@@ -233,7 +233,7 @@
5018 269c c64a 0000 5459 5045 2049 0d0a
[in,ppp0]
-4500 0038 ffee 4000 ef06 5357 96cb e002
+4500 0038 ffee 4000 ef06 1301 96cb e002
0101 0101 0015 8032 3786 7922 bd6b ca1e
5018 269c 1e9e 0000 3230 3020 5479 7065
206f 6b61 792e 0d0a
@@ -249,7 +249,7 @@
5018 269c f072 0000 5155 4954 0d0a
[in,ppp0]
-4500 0036 ffef 4000 ef06 5358 96cb e002
+4500 0036 ffef 4000 ef06 1302 96cb e002
0101 0101 0015 8032 3786 7932 bd6b ca24
5018 269c 68ea 0000 3232 3120 476f 6f64
6279 652e 0d0a
@@ -260,7 +260,7 @@
5011 269c 981f 0000
[in,ppp0]
-4500 0028 fff0 4000 ef06 5365 96cb e002
+4500 0028 fff0 4000 ef06 130f 96cb e002
0101 0101 0015 8032 3786 7940 bd6b ca24
5011 269c 57c9 0000
@@ -270,7 +270,7 @@
5010 269c 981e 0000
[in,ppp0]
-4500 0028 fff1 4000 ef06 5364 96cb e002
+4500 0028 fff1 4000 ef06 130e 96cb e002
0101 0101 0015 8032 3786 7941 bd6b ca25
5010 269c 57c8 0000
diff --git a/contrib/ipfilter/test/input/ni7 b/contrib/ipfilter/test/input/ni7
new file mode 100644
index 0000000..954bb7b
--- /dev/null
+++ b/contrib/ipfilter/test/input/ni7
@@ -0,0 +1,13 @@
+#v tos len id off ttl p sum src dst
+# ICMP timeout exceeded in reply to a ICMP packet coming in.
+[in,df0]
+4500 0028 4706 4000 0111 26b4 0404 0404
+0202 0202 afc9 829e 0014 6b10 0402 0000
+3be5 468d 000a cfc3
+
+[out,df0]
+4500 0038 809a 0000 ff01 2d1d 0303 0303
+0404 0404 0b00 0125 0000 0000
+4500 0028 4706 4000 0111 1eac 0404 0404 0606 0606
+afc9 829e 0014 c15e
+
diff --git a/contrib/ipfilter/test/input/ni8 b/contrib/ipfilter/test/input/ni8
new file mode 100644
index 0000000..788e603
--- /dev/null
+++ b/contrib/ipfilter/test/input/ni8
@@ -0,0 +1,24 @@
+#v tos len id off ttl p sum src dst
+# ICMP dest unreachable with 64 bits in payload (in reply to a TCP packet
+# going out)
+[in,df0] 45 00 00 3c 47 06 40 00 ff 06 20 aa 04 04 04 04 0a 02 02 02 50 00 05 00 00 00 00 01 00 00 00 00 a0 02 16 d0 cc 32 00 00 02 04 05 b4 04 02 08 0a 00 47 fb b0 00 00 00 00 01 03 03 00
+
+[out,df0]
+4500 0038 809a 0000 ff01 2d1d 0303 0303 0404 0404
+0303 0fa3 0000 0000
+4500 003c 4706 4000 ff06 2aac 0404 0404 0101 0101
+5000 9d58 0000 0001
+
+# ICMP dest unreachable with whole packet in payload (40 bytes = 320 bits)
+[out,df0]
+4500 0058 809a 0000 ff01 2cfd 0303 0303 0404 0404
+0303 0735 0000 0000
+4500 003c 4706 4000 ff06 2aac 0404 0404 0101 0101
+5000 9d58 0000 0001 0000 0000 a002 16d0 3ddc 0000
+0204 05b4 0402 080a 0047 fbb0 0000 0000 0103 0300
+
+[out,df0]
+4500 0038 809a 0000 ff01 2b1b 0303 0303 0505 0505
+0303 0fa3 0000 0000
+4500 003c 4706 4000 ff06 2aab 0404 0404 0101 0102 5000 9d58 0000 0001
+
diff --git a/contrib/ipfilter/test/regress/i11 b/contrib/ipfilter/test/regress/i11
index c257f51..68e9283 100644
--- a/contrib/ipfilter/test/regress/i11
+++ b/contrib/ipfilter/test/regress/i11
@@ -2,3 +2,4 @@ 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
pass in proto udp from localhost to localhost port = 2049 keep frags
pass in proto udp from localhost to localhost port = 53 keep state keep frags
+pass in proto tcp from any port gt 1024 to localhost port eq 25 keep state
diff --git a/contrib/ipfilter/test/regress/in1 b/contrib/ipfilter/test/regress/in1
index 6f3b063..59c5754 100644
--- a/contrib/ipfilter/test/regress/in1
+++ b/contrib/ipfilter/test/regress/in1
@@ -22,3 +22,4 @@ map ppp0 192.168.0.0/16 -> 0/32 portmap tcp 10000:19999 age 30
map le0 0/0 -> 0/32 frag age 10
map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45 frag age 10/20
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
diff --git a/contrib/ipfilter/test/regress/ni10.ipf b/contrib/ipfilter/test/regress/ni10.ipf
new file mode 100644
index 0000000..4151b6e
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni10.ipf
@@ -0,0 +1,4 @@
+block in all
+block out all
+pass in proto udp from any to any keep state
+pass in proto tcp from any to any flags S keep state
diff --git a/contrib/ipfilter/test/regress/ni10.nat b/contrib/ipfilter/test/regress/ni10.nat
new file mode 100644
index 0000000..5257818
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni10.nat
@@ -0,0 +1 @@
+rdr df0 2.2.2.2/32 port 0 -> 6.6.6.6 port 0 ip
diff --git a/contrib/ipfilter/test/regress/ni11.ipf b/contrib/ipfilter/test/regress/ni11.ipf
new file mode 100644
index 0000000..4151b6e
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni11.ipf
@@ -0,0 +1,4 @@
+block in all
+block out all
+pass in proto udp from any to any keep state
+pass in proto tcp from any to any flags S keep state
diff --git a/contrib/ipfilter/test/regress/ni11.nat b/contrib/ipfilter/test/regress/ni11.nat
new file mode 100644
index 0000000..87e9673
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni11.nat
@@ -0,0 +1 @@
+rdr df0 10.0.0.0/8 port 1000-2000 -> 1.1.1.1 port 40000 tcp/udp
diff --git a/contrib/ipfilter/test/regress/ni7.ipf b/contrib/ipfilter/test/regress/ni7.ipf
new file mode 100644
index 0000000..4151b6e
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni7.ipf
@@ -0,0 +1,4 @@
+block in all
+block out all
+pass in proto udp from any to any keep state
+pass in proto tcp from any to any flags S keep state
diff --git a/contrib/ipfilter/test/regress/ni7.nat b/contrib/ipfilter/test/regress/ni7.nat
new file mode 100644
index 0000000..5257818
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni7.nat
@@ -0,0 +1 @@
+rdr df0 2.2.2.2/32 port 0 -> 6.6.6.6 port 0 ip
diff --git a/contrib/ipfilter/test/regress/ni8.ipf b/contrib/ipfilter/test/regress/ni8.ipf
new file mode 100644
index 0000000..6666241
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni8.ipf
@@ -0,0 +1 @@
+pass in quick proto tcp from any to any flags S/SAFR keep state
diff --git a/contrib/ipfilter/test/regress/ni8.nat b/contrib/ipfilter/test/regress/ni8.nat
new file mode 100644
index 0000000..87e9673
--- /dev/null
+++ b/contrib/ipfilter/test/regress/ni8.nat
@@ -0,0 +1 @@
+rdr df0 10.0.0.0/8 port 1000-2000 -> 1.1.1.1 port 40000 tcp/udp
diff --git a/contrib/ipfilter/test/vfycksum.pl b/contrib/ipfilter/test/vfycksum.pl
new file mode 100755
index 0000000..b6a2076
--- /dev/null
+++ b/contrib/ipfilter/test/vfycksum.pl
@@ -0,0 +1,264 @@
+
+#
+# validate the IPv4 header checksum.
+# $bytes[] is an array of 16bit values, with $cnt elements in the array.
+#
+sub dosum {
+ local($seed) = $_[0];
+ local($start) = $_[1];
+ local($max) = $_[2];
+ local($idx) = $start;
+ local($lsum) = $seed;
+
+ for ($idx = $start, $lsum = $seed; $idx < $max; $idx++) {
+ $lsum += $bytes[$idx];
+ }
+ while ($lsum > 65535) {
+ $lsum = ($lsum & 0xffff) + ($lsum >> 16);
+ }
+ $lsum = ~$lsum & 0xffff;
+ return $lsum;
+}
+
+sub ipv4check {
+ local($base) = $_[0];
+ $hl = $bytes[$base] / 256;
+ return if (($hl >> 4) != 4); # IPv4 ?
+ $hl &= 0xf;
+ $hl <<= 1; # get the header length in 16bit words
+
+ $hs = &dosum(0, $base, $base + $hl);
+ $osum = $bytes[$base + 5];
+
+ if ($hs != 0) {
+ $bytes[$base + 5] = 0;
+ $hs2 = &dosum($base, 0, $base + $hl);
+ $bytes[$base + 5] = $osum;
+ printf " IP: (%x) %x != %x", $hs, $osum, $hs2;
+ } else {
+ print " IP($base): ok ";
+ }
+
+ #
+ # Recognise TCP & UDP and calculate checksums for each of these.
+ #
+ if (($bytes[$base + 4] & 0xff) == 6) {
+ &tcpcheck($base);
+ }
+
+ if (($bytes[$base + 4] & 0xff) == 17) {
+ &udpcheck($base);
+ }
+
+ if (($bytes[$base + 4] & 0xff) == 1) {
+ &icmpcheck($base);
+ }
+ if ($base == 0) {
+ print "\n";
+ }
+}
+
+sub tcpcheck {
+ local($base) = $_[0];
+ local($hl) = $bytes[$base] / 256;
+ return if (($hl >> 4) != 4);
+ return if ($bytes[3] & 0x1fff);
+ $hl &= 0xf;
+ $hl <<= 1;
+
+ local($hs2);
+ local($hs) = 6; # TCP
+ local($len) = $bytes[$base + 1] - ($hl << 1);
+ $hs += $len;
+ $hs += $bytes[$base + 6]; # source address
+ $hs += $bytes[$base + 7];
+ $hs += $bytes[$base + 8]; # destination address
+ $hs += $bytes[$base + 9];
+ local($tcpsum) = $hs;
+
+ local($thl) = $bytes[$base + $hl + 6] >> 8;
+ $thl &= 0xf0;
+ $thl >>= 2;
+ if (($bytes[$base + 1] > ($cnt - $base) * 2) ||
+ (($cnt - $base) * 2 < $hl + 20) ||
+ (($cnt - $base) * 2 < $hl + $thl)) {
+ print " TCP: missing data";
+ return;
+ }
+
+ local($tcpat) = $base + $hl;
+ $hs = &dosum($tcpsum, $tcpat, $cnt);
+ if ($hs != 0) {
+ local($osum) = $bytes[$tcpat + 8];
+ $bytes[$base + $hl + 8] = 0;
+ $hs2 = &dosum($tcpsum, $tcpat, $cnt);
+ $bytes[$tcpat + 8] = $osum;
+ printf " TCP: (%x) %x != %x", $hs, $osum, $hs2;
+ } else {
+ print " TCP: ok";
+ }
+}
+
+sub udpcheck {
+ local($base) = $_[0];
+ local($hl) = $bytes[0] / 256;
+ return if (($hl >> 4) != 4);
+ return if ($bytes[3] & 0x1fff);
+ $hl &= 0xf;
+ $hl <<= 1;
+
+ local($hs2);
+ local($hs) = 17; # UDP
+ local($len) = $bytes[$base + 1] - ($hl << 1);
+ $hs += $len;
+ $hs += $bytes[$base + 6]; # source address
+ $hs += $bytes[$base + 7];
+ $hs += $bytes[$base + 8]; # destination address
+ $hs += $bytes[$base + 9];
+ local($udpsum) = $hs;
+
+ if ($bytes[$base + 1] > ($cnt - $base) * 2) {
+ print " UDP: missing data(1)";
+ return;
+ } elsif ($bytes[$base + 1] < ($hl << 1) + 8) {
+ print " UDP: missing data(2)";
+ return;
+ } elsif (($cnt - $base) * 2 < ($hl << 1) + 8) {
+ print " UDP: missing data(3)";
+ return;
+ }
+
+ local($udpat) = $base + $hl;
+ $hs = &dosum($udpsum, $udpat, $cnt);
+ local($osum) = $bytes[$udpat + 3];
+
+ #
+ # It is valid for UDP packets to have a 0 checksum field.
+ # If it is 0, then display what it would otherwise be.
+ #
+ if ($osum == 0) {
+ printf " UDP: => %x", $hs;
+ } elsif ($hs != 0) {
+ $bytes[$udpat + 3] = 0;
+ $hs2 = &dosum($udpsum, $udpat, $cnt);
+ $bytes[$udpat + 3] = $osum;
+ printf " UDP: (%x) %x != %x", $hs, $osum, $hs2;
+ } else {
+ print " UDP: ok";
+ }
+}
+
+sub icmpcheck {
+ local($base) = $_[0];
+ local($hl) = $bytes[$base + 0] / 256;
+ return if (($hl >> 4) != 4);
+ return if ($bytes[3] & 0x1fff);
+ $hl &= 0xf;
+ $hl <<= 1;
+
+ local($hs);
+ local($hs2);
+
+ local($len) = $bytes[$base + 1] - ($hl << 1);
+
+ if ($len > $cnt * 2) {
+ print "missing icmp data\n";
+ }
+
+ local($osum) = $bytes[$base + $hl + 1];
+ $bytes[$hl + 1] = 0;
+ for ($i = $base + $hl, $hs2 = 0; $i < $cnt; $i++) {
+ $hs2 += $bytes[$i];
+ }
+ $hs = $hs2 + $osum;
+ while ($hs2 > 65535) {
+ $hs2 = ($hs2 & 0xffff) + ($hs2 >> 16);
+ }
+ while ($hs > 65535) {
+ $hs = ($hs & 0xffff) + ($hs >> 16);
+ }
+ $hs2 = ~$hs2 & 0xffff;
+ $hs = ~$hs & 0xffff;
+
+ if ($osum != $hs2) {
+ printf " ICMP: (%x) %x != %x", $hs, $osum, $hs2;
+ } else {
+ print " ICMP: ok";
+ }
+ if ($base == 0) {
+ $type = $bytes[$hl] >> 8;
+ if ($type == 3 || $type == 4 || $type == 5 ||
+ $type == 11 || $type == 12) {
+ &ipv4check($hl + 4);
+ }
+ }
+}
+
+while ($#ARGV >= 0) {
+ open(I, "$ARGV[0]") || die $!;
+ print "--- $ARGV[0] ---\n";
+ $multi = 0;
+ while (<I>) {
+ chop;
+ s/#.*//g;
+
+ #
+ # If the first non-comment, non-empty line of input starts
+ # with a '[', then allow the input to be a multi-line hex
+ # string, otherwise it has to be all on one line.
+ #
+ if (/^\[/) {
+ $multi=1;
+ s/^\[[^]]*\]//g;
+
+ }
+ s/^ *//g;
+ if (length == 0) {
+ next if ($cnt == 0);
+ &ipv4check(0);
+ $cnt = 0;
+ $multi = 0;
+ next;
+ }
+
+ #
+ # look for 16 bits, represented with leading 0's as required,
+ # in hex.
+ #
+ s/\t/ /g;
+ while (/^[0-9a-fA-F][0-9a-fA-F] [0-9a-fA-F][0-9a-fA-F] .*/) {
+ s/^([0-9a-fA-F][0-9a-fA-F]) ([0-9a-fA-F][0-9a-fA-F]) (.*)/$1$2 $3/;
+ }
+ while (/.* [0-9a-fA-F][0-9a-fA-F] [0-9a-fA-F][0-9a-fA-F] .*/) {
+$b=$_;
+ s/(.*?) ([0-9a-fA-F][0-9a-fA-F]) ([0-9a-fA-F][0-9a-fA-F]) (.*)/$1 $2$3 $4/g;
+ }
+ while (/^[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F].*/) {
+ $x = $_;
+ $x =~ s/([0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]).*/$1/;
+ $x =~ s/ *//g;
+ $y = hex $x;
+ s/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F] *(.*)/$1/;
+ $bytes[$cnt] = $y;
+ $cnt++;
+ }
+
+ #
+ # Pick up stragler bytes.
+ #
+ if (/^[0-9a-fA-F][0-9a-fA-F]/) {
+ $y = hex $_;
+ $bytes[$cnt++] = $y * 256;
+ }
+ if ($multi == 0 && $cnt > 0) {
+ &ipv4check(0);
+ $cnt = 0;
+ }
+ }
+
+ if ($cnt > 0) {
+ &ipv4check(0);
+ }
+ close(I);
+ shift(@ARGV);
+}
OpenPOWER on IntegriCloud