Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/regress/sys/kern/ipf Pull up revision 1.2 (requested by...



details:   https://anonhg.NetBSD.org/src/rev/6368745cb60d
branches:  netbsd-2-0
changeset: 562396:6368745cb60d
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Aug 15 14:51:42 2004 +0000

description:
Pull up revision 1.2 (requested by martti in ticket #763):
Upgraded IPFilter to 4.1.3

diffstat:

 regress/sys/kern/ipf/bpftest        |  12 ++++++++--
 regress/sys/kern/ipf/expected/i12   |  38 +++++++++++++++++++++++++++++++++---
 regress/sys/kern/ipf/expected/ni3   |   6 ++--
 regress/sys/kern/ipf/input/ipv6.1   |   4 +--
 regress/sys/kern/ipf/input/ni3      |   4 +-
 regress/sys/kern/ipf/iptest         |  10 +++++++-
 regress/sys/kern/ipf/ptest          |  14 +++++++++---
 regress/sys/kern/ipf/regress/i12    |  13 ++++++++---
 regress/sys/kern/ipf/regress/ipv6.1 |   2 -
 9 files changed, 76 insertions(+), 27 deletions(-)

diffs (199 lines):

diff -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/bpftest
--- a/regress/sys/kern/ipf/bpftest      Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/bpftest      Sun Aug 15 14:51:42 2004 +0000
@@ -1,4 +1,10 @@
 #!/bin/sh
+#
+# $NetBSD: bpftest,v 1.1.1.1.2.1 2004/08/15 14:51:42 tron Exp $
+#
+TESTDIR=$1
+shift
+
 if [ -f /usr/ucb/touch ] ; then
        TOUCH=/usr/ucb/touch
 else
@@ -14,13 +20,13 @@
 input=`expr $1 : 'bpf-\(.*\)'`
 /bin/cp /dev/null results/$1
 ( while read rule; do
-       echo "$rule" | ../ipftest -Rbr - -i input/$input >> results/$1;
+       echo "$rule" | ipftest -Rbr - -i ${TESTDIR}/input/$input >> results/$1;
        if [ $? -ne 0 ] ; then
                exit 1;
        fi
        echo "--------" >> results/$1
-done ) < regress/$1
-cmp expected/$1 results/$1
+done ) < ${TESTDIR}/regress/$1
+cmp ${TESTDIR}/expected/$1 results/$1
 status=$?
 if [ $status = 0 ] ; then
        $TOUCH $1
diff -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/expected/i12
--- a/regress/sys/kern/ipf/expected/i12 Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/expected/i12 Sun Aug 15 14:51:42 2004 +0000
@@ -1,4 +1,34 @@
-block in on eri0(!) from any to any head 1
-pass in on eri0(!) proto icmp from any to any group 1
-pass out on ed0(!) from any to any head 1000000
-block out on ed0(!) proto udp from any to any group 1000000
+pass in from 1.1.1.1/32 to 2.2.2.2/32
+pass in from 2.2.2.0/24 to 4.4.4.4/32
+pass in from 3.3.3.3/32 to 4.4.4.4/32
+pass in from 2.2.2.0/24 to 5.5.5.5/32
+pass in from 3.3.3.3/32 to 5.5.5.5/32
+pass in from 2.2.2.0/24 to 6.6.6.6/32
+pass in from 3.3.3.3/32 to 6.6.6.6/32
+pass in from 2.2.2.0/24 to 5.5.5.5/32 port = 22
+pass in from 3.3.3.3/32 to 5.5.5.5/32 port = 22
+pass in from 2.2.2.0/24 to 6.6.6.6/32 port = 22
+pass in from 3.3.3.3/32 to 6.6.6.6/32 port = 22
+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 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
+pass in proto udp from 3.3.3.3/32 to 6.6.6.6/32 port = 53
+pass in proto udp from 2.2.2.0/24 to 5.5.5.5/32 port = 9
+pass in proto udp from 3.3.3.3/32 to 5.5.5.5/32 port = 9
+pass in proto udp from 2.2.2.0/24 to 6.6.6.6/32 port = 9
+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(!)
diff -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/expected/ni3
--- a/regress/sys/kern/ipf/expected/ni3 Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/expected/ni3 Sun Aug 15 14:51:42 2004 +0000
@@ -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 0000 4000 ff06 67a8 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 -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/input/ipv6.1
--- a/regress/sys/kern/ipf/input/ipv6.1 Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/input/ipv6.1 Sun Aug 15 14:51:42 2004 +0000
@@ -1,11 +1,9 @@
-.\"    $NetBSD: ipv6.1,v 1.1.1.1 2002/09/19 07:57:05 martti Exp $
-.\"
 [out,gif0] 6000 0000 0018 1101
 ef00 1001 2002 0001 0000 0000 0000 0070
 2001 1002 3333 0001 0000 0000 0000 0001
 8083 829a
 0018
-f427
+f4c1
 0000 0344 0000 0004 f8f1 9d3c ddba 0e00
 
 [in,gif0] 6000 0000 0048 3a40
diff -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/input/ni3
--- a/regress/sys/kern/ipf/input/ni3    Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/input/ni3    Sun Aug 15 14:51:42 2004 +0000
@@ -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 -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/iptest
--- a/regress/sys/kern/ipf/iptest       Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/iptest       Sun Aug 15 14:51:42 2004 +0000
@@ -1,4 +1,10 @@
 #!/bin/sh
+#
+# $NetBSD: iptest,v 1.1.1.1.2.1 2004/08/15 14:51:42 tron Exp $
+#
+TESTDIR=$1
+shift
+
 mkdir -p results
 if [ -f /usr/ucb/touch ] ; then
        TOUCH=/usr/ucb/touch
@@ -13,8 +19,8 @@
 fi
 echo "$1...";
 /bin/cp /dev/null results/$1
-../ippool -f regress/$1 -nRv 2>/dev/null > results/$1
-cmp expected/$1 results/$1
+ippool -f ${TESTDIR}/regress/$1 -nRv 2>/dev/null > results/$1
+cmp ${TESTDIR}/expected/$1 results/$1
 status=$?
 if [ $status = 0 ] ; then
        $TOUCH $1
diff -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/ptest
--- a/regress/sys/kern/ipf/ptest        Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/ptest        Sun Aug 15 14:51:42 2004 +0000
@@ -1,4 +1,10 @@
 #!/bin/sh
+#
+# $NetBSD: ptest,v 1.1.1.1.2.1 2004/08/15 14:51:42 tron Exp $
+#
+TESTDIR=$1
+shift
+
 mkdir -p results
 if [ -f /usr/ucb/touch ] ; then
        TOUCH=/usr/ucb/touch
@@ -13,17 +19,17 @@
 fi
 echo "$1...";
 /bin/cp /dev/null results/$1
-if [ -f regress/$1.pool ] ; then
-       ../ipftest -RD -b -P regress/$1.pool -r regress/$1.ipf -i input/$1 >> \
+if [ -f ${TESTDIR}/regress/$1.pool ] ; then
+       ipftest -RD -b -P ${TESTDIR}/regress/$1.pool -r ${TESTDIR}/regress/$1.ipf -i ${TESTDIR}/input/$1 >> \
                results/$1
 else
-       ../ipftest -RD -b -r regress/$1.ipf -i input/$1 >> results/$1
+       ipftest -RD -b -r ${TESTDIR}/regress/$1.ipf -i ${TESTDIR}/input/$1 >> results/$1
 fi
 if [ $? -ne 0 ] ; then
        exit 1;
 fi
 echo "-------------------------------" >> results/$1
-cmp expected/$1 results/$1
+cmp ${TESTDIR}/expected/$1 results/$1
 status=$?
 if [ $status = 0 ] ; then
        $TOUCH $1
diff -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/regress/i12
--- a/regress/sys/kern/ipf/regress/i12  Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/regress/i12  Sun Aug 15 14:51:42 2004 +0000
@@ -1,4 +1,9 @@
-block in on eri0 all head 1
-pass in on eri0 proto icmp all group 1
-pass out on ed0 all head 1000000
-block out on ed0 proto udp all group 1000000
+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 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
diff -r bdeb6caa441d -r 6368745cb60d regress/sys/kern/ipf/regress/ipv6.1
--- a/regress/sys/kern/ipf/regress/ipv6.1       Sun Aug 15 14:28:39 2004 +0000
+++ b/regress/sys/kern/ipf/regress/ipv6.1       Sun Aug 15 14:51:42 2004 +0000
@@ -1,3 +1,1 @@
-.\"    $NetBSD: ipv6.1,v 1.1.1.1 2002/09/19 07:57:05 martti Exp $
-.\"
 pass out log quick on gif0 proto udp from ef00:1001:2002::/48 to any port 33433 >< 34000 keep state



Home | Main Index | Thread Index | Old Index