forked from extern/shorewall_code
First successfull 'shorewall restart' with Perl compiler
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5575 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
97b0cd1d4a
commit
1fd340c6d7
@ -123,8 +123,12 @@ sub setup_tunnels() {
|
||||
|
||||
( $kind, my ( $proto, $p ) ) = split /:/, $kind;
|
||||
|
||||
$port = $p if $p;
|
||||
$protocol = $proto if $proto;
|
||||
if ( $p ) {
|
||||
$port = $p;
|
||||
$protocol = $proto;
|
||||
} elsif ( $proto ) {
|
||||
$port = $proto;
|
||||
}
|
||||
|
||||
add_rule $inchainref, "-p $protocol $source --dport $port -j ACCEPT";
|
||||
add_rule $outchainref, "-p $protocol $dest --dport $port -j ACCEPT";
|
||||
@ -138,8 +142,12 @@ sub setup_tunnels() {
|
||||
|
||||
( $kind, my ( $proto, $p ) ) = split /:/, $kind;
|
||||
|
||||
$port = $p if $p;
|
||||
$protocol = $proto if $proto;
|
||||
if ( $p ) {
|
||||
$port = $p;
|
||||
$protocol = $proto;
|
||||
} elsif ( $proto ) {
|
||||
$port = $proto;
|
||||
}
|
||||
|
||||
add_rule $inchainref, "-p $protocol $source --sport $port -j ACCEPT";
|
||||
add_rule $outchainref, "-p $protocol $dest --dport $port -j ACCEPT";
|
||||
@ -153,8 +161,12 @@ sub setup_tunnels() {
|
||||
|
||||
( $kind, my ( $proto, $p ) ) = split /:/, $kind;
|
||||
|
||||
$port = $p if $p;
|
||||
$protocol = $proto if $proto;
|
||||
if ( $p ) {
|
||||
$port = $p;
|
||||
$protocol = $proto;
|
||||
} elsif ( $proto ) {
|
||||
$port = $proto;
|
||||
}
|
||||
|
||||
add_rule $inchainref, "-p $protocol $source --dport $port -j ACCEPT";
|
||||
add_rule $outchainref, "-p $protocol $dest --sport $port -j ACCEPT";
|
||||
|
@ -83,7 +83,7 @@ sub generate_script_1 {
|
||||
emit 'CONFDIR=/etc/shorewall';
|
||||
emit 'VARDIR=/var/lib/shorewall\n';
|
||||
emit 'PRODUCT=\'Shorewall\'';
|
||||
emit '. /usr/share/shoreall/lib.base';
|
||||
emit '. /usr/share/shorewall/lib.base';
|
||||
}
|
||||
|
||||
emit '';
|
||||
@ -92,6 +92,7 @@ sub generate_script_1 {
|
||||
emit "run_${exit}_exit() {";
|
||||
push_indent;
|
||||
append_file $exit;
|
||||
emit 'true';
|
||||
pop_indent;
|
||||
emit "}\n";
|
||||
}
|
||||
@ -111,7 +112,7 @@ sub generate_script_1 {
|
||||
emit ' fatal_error "This script requires Shorewall which do not appear to be installed on this system (did you forget \"-e\" when you compiled?)"';
|
||||
emit 'fi';
|
||||
emit '';
|
||||
emit 'local version=\$(cat \${SHAREDIR}/version)';
|
||||
emit 'local version=$(cat ${SHAREDIR}/version)';
|
||||
emit '';
|
||||
emit 'if [ ${SHOREWALL_LIBVERSION:-0} -lt 30203 ]; then';
|
||||
emit ' fatal_error "This script requires Shorewall version 3.3.3 or later; current version is $version"';
|
||||
@ -514,7 +515,7 @@ sub generate_script_3() {
|
||||
|
||||
pop_indent;
|
||||
|
||||
emit "}/n";
|
||||
emit "}\n";
|
||||
|
||||
progress_message2 "Creating iptables-restore input...";
|
||||
create_netfilter_load;
|
||||
|
Loading…
Reference in New Issue
Block a user