On Mon, Jun 12, 2017 at 11:43:44PM +0200, Alexandr Nedvedicky wrote:
> Hello Adam,
>
> </snip>
>
> > It was a rainy evening here, so here's the updated pfctl diff.
>
> I'm sorry to hear about the rainy weather [1].
> anyway, you might want to run regression test for pfctl.
>
> cd $SRC/src/regress/sbin/pfctl
> cat Makefile
> # follow instructions
>
> just for sure.
Ran the tests both on the unmodified and changed pfctl using a stock unmodified
GENERIC kernel.
One test case fails pfcmd1.
Passing test redirected to a file:
# make > /root/pfctl-old.log
cp: /usr/src/regress/sbin/pfctl/pf95.include and
/usr/src/regress/sbin/pfctl/pf95.include are identical (not copied).
cp: /usr/src/regress/sbin/pfctl/pf103.include and
/usr/src/regress/sbin/pfctl/pf103.include are identical (not copied).
Loading anchor x from pf103.include
rules cleared
pfctl: Anchor or Ruleset does not exist.
# echo $?
0
#
Failing test:
# make > /root/pfctl-new.log
cp: /usr/src/regress/sbin/pfctl/pf95.include and
/usr/src/regress/sbin/pfctl/pf95.include are identical (not copied).
cp: /usr/src/regress/sbin/pfctl/pf103.include and
/usr/src/regress/sbin/pfctl/pf103.include are identical (not copied).
Loading anchor x from pf103.include
rules cleared
pfctl: Anchor or Ruleset does not exist.
pfctl: pfctl_clear_tables: Anchor or Ruleset does not exist
*** Error 1 in . (Makefile:238 'pfcmd1')
# echo $?
0
#
differences in output:
# diff -u pfctl-old.log pfctl-new.log
--- pfctl-old.log Tue Jun 13 00:07:57 2017
+++ pfctl-new.log Tue Jun 13 00:09:19 2017
@@ -720,6 +720,5 @@
/usr/bin/doas ifconfig tun1000000 create
/usr/bin/doas ifconfig tun1000001 create
/usr/bin/doas pfctl `cat /usr/src/regress/sbin/pfctl/pfcmd1.opts` -f
/usr/src/regress/sbin/pfctl/pfcmd1.in
-/usr/bin/doas ifconfig lo1000000 destroy
-/usr/bin/doas ifconfig tun1000000 destroy
-/usr/bin/doas ifconfig tun1000001 destroy
+FAILED
+*** Error 1 in target 'regress' (ignored)
The input data:
-a regress/does_not_exist -Fa
I did not account for the -a anchor command being able to be combined with
other commands.
I also ran the regress tests on the original diff sent to the list (without my
modifications):
# make > /root/pfctl-op.log
cp: /usr/src/regress/sbin/pfctl/pf95.include and
/usr/src/regress/sbin/pfctl/pf95.include are identical (not copied).
cp: /usr/src/regress/sbin/pfctl/pf103.include and
/usr/src/regress/sbin/pfctl/pf103.include are identical (not copied).
Loading anchor x from pf103.include
rules cleared
pfctl: Anchor or Ruleset does not exist.
# echo $?
0
#
differences in output:
# diff -u /root/pfctl-old.log /root/pfctl-op.log
#
They result with no change.
>
> regards
> sasha
>
> [1] https://www.youtube.com/watch?v=51Kof78YBVM
>
Thanks, this made my day :)