Add hidden option to allow testing of new perl-based compiler

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5495 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-11 21:20:31 +00:00
parent c20446d32b
commit 829a6fd249
3 changed files with 16 additions and 3 deletions

View File

@ -5655,7 +5655,9 @@ usage() {
# #
# Start trace if first arg is "debug" # Start trace if first arg is "debug"
# #
[ $# -gt 1 ] && [ "$1" = "debug" ] && { set -x ; shift ; } debug='-w'
[ $# -gt 1 ] && [ "$1" = "debug" ] && { set -x ; debug='-wd' ; shift ; }
NOLOCK= NOLOCK=
@ -5689,13 +5691,13 @@ case "$COMMAND" in
check) check)
[ $# -ne 1 ] && usage [ $# -ne 1 ] && usage
do_initialize do_initialize
compile_firewall [ -n "$EXPERIMENTAL" ] && exec perl $debug $(find_file compiler.pl) || exec compile_firewall
;; ;;
compile) compile)
[ $# -ne 2 ] && usage [ $# -ne 2 ] && usage
do_initialize do_initialize
compile_firewall $2 [ -n "$EXPERIMENTAL" ] && exec perl $debug $(find_file compiler.pl) $2 || exec compile_firewall $2
;; ;;
call) call)

View File

@ -963,6 +963,7 @@ determine_capabilities() {
XMARK= XMARK=
MANGLE_FORWARD= MANGLE_FORWARD=
COMMENTS= COMMENTS=
ADDRTYPE=
qt $IPTABLES -N fooX1234 qt $IPTABLES -N fooX1234
qt $IPTABLES -A fooX1234 -m conntrack --ctorigdst 192.168.1.1 -j ACCEPT && CONNTRACK_MATCH=Yes qt $IPTABLES -A fooX1234 -m conntrack --ctorigdst 192.168.1.1 -j ACCEPT && CONNTRACK_MATCH=Yes
@ -1029,6 +1030,7 @@ determine_capabilities() {
fi fi
qt $IPTABLES -A fooX1234 -m pkttype --pkt-type broadcast -j ACCEPT && USEPKTTYPE=Yes qt $IPTABLES -A fooX1234 -m pkttype --pkt-type broadcast -j ACCEPT && USEPKTTYPE=Yes
qt $IPTABLES -A fooX1234 -m addrtype --src-type BROADCAST -j ACCEPT && ADDRTYPE=Yes
qt $IPTABLES -F fooX1234 qt $IPTABLES -F fooX1234
qt $IPTABLES -X fooX1234 qt $IPTABLES -X fooX1234
@ -1072,6 +1074,7 @@ report_capabilities() {
[ -n "$MARK" ] && report_capability "Extended MARK Target" $XMARK [ -n "$MARK" ] && report_capability "Extended MARK Target" $XMARK
report_capability "Mangle FORWARD Chain" $MANGLE_FORWARD report_capability "Mangle FORWARD Chain" $MANGLE_FORWARD
report_capability "Comments" $COMMENTS report_capability "Comments" $COMMENTS
report_capability "Address Type Match" $ADDRTYPE
fi fi
[ -n "$PKTTYPE" ] || USEPKTTYPE= [ -n "$PKTTYPE" ] || USEPKTTYPE=
@ -1113,6 +1116,7 @@ report_capabilities1() {
report_capability1 XMARK report_capability1 XMARK
report_capability1 MANGLE_FORWARD report_capability1 MANGLE_FORWARD
report_capability1 COMMENTS report_capability1 COMMENTS
report_capability1 ADDRTYPE
} }
# #

View File

@ -1805,6 +1805,7 @@ do_initialize() {
USE_ACTIONS= USE_ACTIONS=
OPTIMIZE= OPTIMIZE=
EXPORTPARAMS= EXPORTPARAMS=
EXPERIMENTAL=
# #
# Packet Disposition # Packet Disposition
# #
@ -2029,6 +2030,7 @@ do_initialize() {
TC_EXPERT=$(added_param_value_no TC_EXPERT $TC_EXPERT) TC_EXPERT=$(added_param_value_no TC_EXPERT $TC_EXPERT)
USE_ACTIONS=$(added_param_value_yes USE_ACTIONS $USE_ACTIONS) USE_ACTIONS=$(added_param_value_yes USE_ACTIONS $USE_ACTIONS)
EXPORTPARAMS=$(added_param_value_yes EXPORTPARAMS $EXPORTPARAMS) EXPORTPARAMS=$(added_param_value_yes EXPORTPARAMS $EXPORTPARAMS)
EXPERIMENTAL=$(added_param_value_no EXPERIMENTAL $EXPERIMENTAL)
[ -n "$USE_ACTIONS" ] && lib_load actions "USE_ACTIONS=Yes" [ -n "$USE_ACTIONS" ] && lib_load actions "USE_ACTIONS=Yes"
[ -n "$XCONNMARK_MATCH" ] || XCONNMARK= [ -n "$XCONNMARK_MATCH" ] || XCONNMARK=
@ -2173,6 +2175,11 @@ do_initialize() {
strip_file_and_lib_load tcrules tcrules strip_file_and_lib_load tcrules tcrules
strip_file tos strip_file tos
strip_file_and_lib_load tunnels tunnels strip_file_and_lib_load tunnels tunnels
if [ -n $EXPERIMENTAL ]; then
report_capabilities1 > $TMP_DIR/capabilities
export TMP_DIR
export CONFIG_PATH
fi
fi fi
# #
# Clear $FW # Clear $FW