Hi folks,
Would it be possible for "pfctl -f" to search include files relative to
the including file instead of the cwd, similar to #include "myheader.h"
in C?
This would help to check the syntax before putting the new pf files
into place.
Sample: Using
include "pf_customers.conf"
in my pf.conf I've got
# pfctl -nf /tmp/pf.conf
pfctl: pf_customers.conf: No such file or directory
/tmp/pf.conf:141: failed to include file pf_customers.conf
# cd /etc
# pfctl -nf /tmp/pf.conf
# cp -p /tmp/pf.conf /tmp/pf_customers.conf .
# pfctl -nf /etc/pf.conf
pf_customers.conf:3: syntax error
pf_customers.conf:7: reached end of file while parsing quoted string
Probably you guessed what has happened: pfctl found /etc/pf_customers.conf
instead of /tmp/pf_customers.conf .
Regards
Harri