diff options
Diffstat (limited to 'regress/sbin/pfctl')
-rw-r--r-- | regress/sbin/pfctl/pfr.exec | 47 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr1.ok | 8 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr10.ok | 20 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr11.ok | 20 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr12.ok | 22 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr13.ok | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr2.ok | 8 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr3.ok | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr4.ok | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr5.ok | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr6.ok | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr7.ok | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr8.ok | 6 | ||||
-rw-r--r-- | regress/sbin/pfctl/pfr9.ok | 6 |
14 files changed, 99 insertions, 74 deletions
diff --git a/regress/sbin/pfctl/pfr.exec b/regress/sbin/pfctl/pfr.exec index 9264fdd6cb1..2f5a6918dc8 100644 --- a/regress/sbin/pfctl/pfr.exec +++ b/regress/sbin/pfctl/pfr.exec @@ -1,16 +1,15 @@ #!/bin/ksh D=`dirname $1` -for TABLE in `pfctl -sT | grep regress`; do - pfctl -t $TABLE -qTk 2>&1 || exit 1 -done -pfctl -Fr -a regress:regress 2>/dev/null -pfctl -Fn -a regress:regress 2>/dev/null +A='regress:regress' +pfctl -a $A -FT 2>/dev/null +pfctl -a $A -Fr 2>/dev/null +pfctl -a $A -Fn 2>/dev/null KT_A=0`vmstat -m | awk '/pfrktable/{print $3}'` KT_R=0`vmstat -m | awk '/pfrktable/{print $5}'` KE_A=0`vmstat -m | awk '/pfrkentry/{print $3}'` KE_R=0`vmstat -m | awk '/pfrkentry/{print $5}'` echo "# create" -echo "table <regress> persist" | pfctl -Tl -f - 2>&1 || exit 1 +echo "table <regress> persist" | pfctl -a $A -Tl -f - 2>&1 || exit 1 for LINE in `sed -e "s/ /_/g" $1`; do RESULT=`echo $LINE | awk '{split($1,a,"_");print a[1]}'` case $RESULT in @@ -30,53 +29,55 @@ for LINE in `sed -e "s/ /_/g" $1`; do if [ "$RESULT" = "pass" ]; then case $CMD in add|delete|replace) echo "# pass $CMD -n $ARGS" - pfctl -t regress -nT $CMD $ARGS 2>&1 | sort || exit 1 + pfctl -a $A -t regress -nT $CMD $ARGS 2>&1 | sort || exit 1 echo "# pass $CMD -nf-" - echo "# test\n" $ARGSX | pfctl -t regress -nT $CMD -f- \ + echo "# test\n" $ARGSX | pfctl -a $A -t regress -nT $CMD -f- \ 2>&1 | sort || exit 1 echo "# pass $CMD -nqv $ARGS" - pfctl -t regress -nqvT $CMD $ARGS 2>&1 | sort || exit 1 + pfctl -a $A -t regress -nqvT $CMD $ARGS 2>&1 | sort || exit 1 echo "# pass $CMD -nqvv $ARGS" - pfctl -t regress -nqvvT $CMD $ARGS 2>&1 | sort || exit 1 + pfctl -a $A -t regress -nqvvT $CMD $ARGS 2>&1 | sort || exit 1 ;; esac fi echo "# $RESULT $CMD $ARGS" if [ "$RESULT" = "pass" ]; then case $CMD in list) - (pfctl -sT | grep regress) 2>&1 + pfctl -a $A -sT 2>&1 echo "# pass $CMD -v" - (pfctl -gvsT | grep regress) 2>&1 + pfctl -a $A -gvsT 2>&1 ;; load) - echo $ARGS | sed "s,DIR,$D,g" | pfctl -Tl -f- || exit 1 + echo $ARGS | sed "s,DIR,$D,g" | pfctl -a $A -Tl -f- \ + || exit 1 ;; rule) - echo $ARGS | pfctl -a regress:regress -f- 2>&1 || exit 1 + echo $ARGS | pfctl -a $A -f- 2>&1 || exit 1 ;; *) - pfctl -t regress -T $CMD $ARGS 2>&1 | sort || exit 1 + pfctl -a $A -t regress -T $CMD $ARGS 2>&1 | sort \ + || exit 1 ;; esac else case $CMD in load) - echo ARGS | sed "s,DIR,$D,g" | pfctl -Tl -f- && exit 1 + echo ARGS | sed "s,DIR,$D,g" | pfctl -a $A -Tl -f- \ + && exit 1 ;; rule) - echo $ARGS | pfctl -a regress:regress -f- 2>&1 && exit 1 ;; + echo $ARGS | pfctl -a $A -f- 2>&1 && exit 1 + ;; *) - pfctl -t regress -T $CMD $ARGS 2>&1 && exit 1 + pfctl -a $A -t regress -T $CMD $ARGS 2>&1 && exit 1 ;; esac fi done echo "# kill" -for TABLE in `pfctl -sT | grep regress`; do - pfctl -t $TABLE -Tk 2>&1 || exit 1 -done -pfctl -Fr -a regress:regress 2>/dev/null -pfctl -Fn -a regress:regress 2>/dev/null +pfctl -a $A -FT 2>&1 +pfctl -a $A -Fr 2>&1 +pfctl -a $A -Fn 2>&1 let KT_A=`vmstat -m | awk '/pfrktable/{print $3}'`-$KT_A let KT_R=`vmstat -m | awk '/pfrktable/{print $5}'`-$KT_R let KT_L=$KT_A-$KT_R diff --git a/regress/sbin/pfctl/pfr1.ok b/regress/sbin/pfctl/pfr1.ok index e83d4fcdd27..8420746d863 100644 --- a/regress/sbin/pfctl/pfr1.ok +++ b/regress/sbin/pfctl/pfr1.ok @@ -55,8 +55,10 @@ A 1.1.1.2 # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # kill -1 table deleted. -ktable: 12 allocated, 12 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 13 allocated, 13 released, 0 leaked. kentry: 25 allocated, 25 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr10.ok b/regress/sbin/pfctl/pfr10.ok index 87233dc8a16..4a17f51c96f 100644 --- a/regress/sbin/pfctl/pfr10.ok +++ b/regress/sbin/pfctl/pfr10.ok @@ -2,31 +2,31 @@ # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # pass load table <regress.1> const # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # pass load table <regress.1> persist const # pass list regress regress.1 # pass list -v --pa--- regress -cpa--- regress.1 +-pa--- regress regress:regress +cpa--- regress.1 regress:regress # pass load table <regress.1> persist # pass list regress regress.1 # pass list -v --pa--- regress --pa--- regress.1 +-pa--- regress regress:regress +-pa--- regress.1 regress:regress # pass load table <regress.1> # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # pass load table <regress> persist { 1.2.3.4 1.2.3.4 4.3.2.1 } # pass show 1.2.3.4 @@ -38,6 +38,8 @@ regress # pass load table <regress> persist {} # pass show # kill -1 table deleted. -ktable: 11 allocated, 11 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 14 allocated, 14 released, 0 leaked. kentry: 2 allocated, 2 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr11.ok b/regress/sbin/pfctl/pfr11.ok index d44a3b5d78f..96483255f79 100644 --- a/regress/sbin/pfctl/pfr11.ok +++ b/regress/sbin/pfctl/pfr11.ok @@ -2,36 +2,34 @@ # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # pass rule pass in from <regress.1> to any # pass list regress # pass list -v --pa--- regress ------h regress.1 +-pa--- regress regress:regress ----r- regress.1 regress:regress # pass rule pass in from <regress.1> to <regress.2> # pass list regress # pass list -v --pa--- regress ------h regress.1 +-pa--- regress regress:regress ----r- regress.1 regress:regress ------h regress.2 ----r- regress.2 regress:regress # pass rule pass in from <regress.1> to any # pass list regress # pass list -v --pa--- regress ------h regress.1 +-pa--- regress regress:regress ----r- regress.1 regress:regress # pass rule # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # kill -1 table deleted. -ktable: 6 allocated, 6 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 7 allocated, 7 released, 0 leaked. kentry: 0 allocated, 0 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr12.ok b/regress/sbin/pfctl/pfr12.ok index 194e97eacb6..1772094cb3d 100644 --- a/regress/sbin/pfctl/pfr12.ok +++ b/regress/sbin/pfctl/pfr12.ok @@ -2,44 +2,48 @@ # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # pass kill 1 table deleted. # pass list +pfctl: Anchor or Ruleset does not exist. # pass list -v +pfctl: Anchor or Ruleset does not exist. # pass rule pass in from <regress> to any # pass list # pass list -v ------h regress ----r- regress regress:regress # pass list # pass list -v ------h regress ----r- regress regress:regress # pass rule # pass list +pfctl: Anchor or Ruleset does not exist. # pass list -v +pfctl: Anchor or Ruleset does not exist. # pass kill 0 table deleted. # pass list +pfctl: Anchor or Ruleset does not exist. # pass list -v +pfctl: Anchor or Ruleset does not exist. # pass rule pass in from <regress> to any # pass list # pass list -v ------h regress ----r- regress regress:regress # pass load table <regress> persist # pass list regress # pass list -v --pa--h regress -----r- regress regress:regress +-pa-r- regress regress:regress # pass rule # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # kill -1 table deleted. -ktable: 7 allocated, 7 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 8 allocated, 8 released, 0 leaked. kentry: 0 allocated, 0 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr13.ok b/regress/sbin/pfctl/pfr13.ok index 1b815d6c7ae..84cc5ee0a42 100644 --- a/regress/sbin/pfctl/pfr13.ok +++ b/regress/sbin/pfctl/pfr13.ok @@ -387,6 +387,8 @@ fe80::1 !12.0.0.0/8 # kill -1 table deleted. -ktable: 7 allocated, 7 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 8 allocated, 8 released, 0 leaked. kentry: 377 allocated, 377 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr2.ok b/regress/sbin/pfctl/pfr2.ok index ed41b7ae0e1..7ffb5524bbe 100644 --- a/regress/sbin/pfctl/pfr2.ok +++ b/regress/sbin/pfctl/pfr2.ok @@ -55,8 +55,10 @@ A ::2 # pass list regress # pass list -v --pa--- regress +-pa--- regress regress:regress # kill -1 table deleted. -ktable: 12 allocated, 12 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 13 allocated, 13 released, 0 leaked. kentry: 25 allocated, 25 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr3.ok b/regress/sbin/pfctl/pfr3.ok index df680b9cc30..6e75df72d67 100644 --- a/regress/sbin/pfctl/pfr3.ok +++ b/regress/sbin/pfctl/pfr3.ok @@ -52,6 +52,8 @@ D 10.11.12.13 # fail test 10.1.1.1 11.1.1.1 1/2 addresses match. # kill -1 table deleted. -ktable: 12 allocated, 12 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 13 allocated, 13 released, 0 leaked. kentry: 30 allocated, 30 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr4.ok b/regress/sbin/pfctl/pfr4.ok index 870ada4e767..40d7d7722f7 100644 --- a/regress/sbin/pfctl/pfr4.ok +++ b/regress/sbin/pfctl/pfr4.ok @@ -189,6 +189,8 @@ D 0.0.0.0/23 0.0.0.0/30 0.0.0.0/31 # kill -1 table deleted. -ktable: 22 allocated, 22 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 23 allocated, 23 released, 0 leaked. kentry: 160 allocated, 160 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr5.ok b/regress/sbin/pfctl/pfr5.ok index 3509ce7eeca..f2ab0297d95 100644 --- a/regress/sbin/pfctl/pfr5.ok +++ b/regress/sbin/pfctl/pfr5.ok @@ -813,6 +813,8 @@ D ::/119 ::/126 ::/127 # kill -1 table deleted. -ktable: 82 allocated, 82 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 83 allocated, 83 released, 0 leaked. kentry: 640 allocated, 640 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr6.ok b/regress/sbin/pfctl/pfr6.ok index 78feb43413b..9705fda2b41 100644 --- a/regress/sbin/pfctl/pfr6.ok +++ b/regress/sbin/pfctl/pfr6.ok @@ -144,6 +144,8 @@ A !fe80:fe80::/32 # fail test 10.1.1.1 11.1.1.1 1/2 addresses match. # kill -1 table deleted. -ktable: 27 allocated, 27 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 28 allocated, 28 released, 0 leaked. kentry: 95 allocated, 95 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr7.ok b/regress/sbin/pfctl/pfr7.ok index 92813dae9fe..07b66b32096 100644 --- a/regress/sbin/pfctl/pfr7.ok +++ b/regress/sbin/pfctl/pfr7.ok @@ -4,6 +4,8 @@ no IP address found for 1.2.3.4.5 # fail add :80 no IP address found for :80 # kill -1 table deleted. -ktable: 2 allocated, 2 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 3 allocated, 3 released, 0 leaked. kentry: 0 allocated, 0 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr8.ok b/regress/sbin/pfctl/pfr8.ok index 039807b839f..5e574729f35 100644 --- a/regress/sbin/pfctl/pfr8.ok +++ b/regress/sbin/pfctl/pfr8.ok @@ -14,6 +14,8 @@ A ::1 # fail add invalid$host no IP address found for invalid$host # kill -1 table deleted. -ktable: 7 allocated, 7 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 8 allocated, 8 released, 0 leaked. kentry: 10 allocated, 10 released, 0 leaked. diff --git a/regress/sbin/pfctl/pfr9.ok b/regress/sbin/pfctl/pfr9.ok index ce33db399d3..f9e01b46993 100644 --- a/regress/sbin/pfctl/pfr9.ok +++ b/regress/sbin/pfctl/pfr9.ok @@ -89,6 +89,8 @@ no changes. 1.2.3.4 ::1 # kill -1 table deleted. -ktable: 22 allocated, 22 released, 0 leaked. +1 tables deleted. +rules cleared +nat cleared +ktable: 23 allocated, 23 released, 0 leaked. kentry: 20 allocated, 20 released, 0 leaked. |