mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-27 01:53:27 +01:00
Make it clear which family's forwarding is being enabled/disabled
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9011 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
b4cc254fef
commit
2619b59272
@ -534,10 +534,10 @@ EOF
|
|||||||
if ( $family == F_IPV4 ) {
|
if ( $family == F_IPV4 ) {
|
||||||
if ( $config{IP_FORWARDING} eq 'on' ) {
|
if ( $config{IP_FORWARDING} eq 'on' ) {
|
||||||
emit( 'echo 1 > /proc/sys/net/ipv4/ip_forward',
|
emit( 'echo 1 > /proc/sys/net/ipv4/ip_forward',
|
||||||
'progress_message2 IP Forwarding Enabled' );
|
'progress_message2 IPv4 Forwarding Enabled' );
|
||||||
} elsif ( $config{IP_FORWARDING} eq 'off' ) {
|
} elsif ( $config{IP_FORWARDING} eq 'off' ) {
|
||||||
emit( 'echo 0 > /proc/sys/net/ipv4/ip_forward',
|
emit( 'echo 0 > /proc/sys/net/ipv4/ip_forward',
|
||||||
'progress_message2 IP Forwarding Disabled!'
|
'progress_message2 IPv4 Forwarding Disabled!'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -547,10 +547,10 @@ EOF
|
|||||||
|
|
||||||
if ( $config{IP_FORWARDING} eq 'on' ) {
|
if ( $config{IP_FORWARDING} eq 'on' ) {
|
||||||
emit( 'echo 1 > /proc/sys/net/ipv6/conf/all/forwarding',
|
emit( 'echo 1 > /proc/sys/net/ipv6/conf/all/forwarding',
|
||||||
'progress_message2 IP Forwarding Enabled' );
|
'progress_message2 IPv6 Forwarding Enabled' );
|
||||||
} elsif ( $config{IP_FORWARDING} eq 'off' ) {
|
} elsif ( $config{IP_FORWARDING} eq 'off' ) {
|
||||||
emit( 'echo 0 > /proc/sys/net/ipv6/conf/all/forwarding',
|
emit( 'echo 0 > /proc/sys/net/ipv6/conf/all/forwarding',
|
||||||
'progress_message2 IP Forwarding Disabled!'
|
'progress_message2 IPv6 Forwarding Disabled!'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,19 +203,19 @@ sub setup_forwarding( $ ) {
|
|||||||
if ( $family == F_IPV4 ) {
|
if ( $family == F_IPV4 ) {
|
||||||
if ( $config{IP_FORWARDING} eq 'on' ) {
|
if ( $config{IP_FORWARDING} eq 'on' ) {
|
||||||
emit ' echo 1 > /proc/sys/net/ipv4/ip_forward';
|
emit ' echo 1 > /proc/sys/net/ipv4/ip_forward';
|
||||||
emit ' progress_message2 IP Forwarding Enabled';
|
emit ' progress_message2 IPv4 Forwarding Enabled';
|
||||||
} elsif ( $config{IP_FORWARDING} eq 'off' ) {
|
} elsif ( $config{IP_FORWARDING} eq 'off' ) {
|
||||||
emit ' echo 0 > /proc/sys/net/ipv4/ip_forward';
|
emit ' echo 0 > /proc/sys/net/ipv4/ip_forward';
|
||||||
emit ' progress_message2 IP Forwarding Disabled!';
|
emit ' progress_message2 IPv4 Forwarding Disabled!';
|
||||||
emit '';
|
emit '';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( $config{IP_FORWARDING} eq 'on' ) {
|
if ( $config{IP_FORWARDING} eq 'on' ) {
|
||||||
emit ' echo 1 > /proc/sys/net/ipv6/conf/all/forwarding';
|
emit ' echo 1 > /proc/sys/net/ipv6/conf/all/forwarding';
|
||||||
emit ' progress_message2 IP Forwarding Enabled';
|
emit ' progress_message2 IPv6 Forwarding Enabled';
|
||||||
} elsif ( $config{IP_FORWARDING} eq 'off' ) {
|
} elsif ( $config{IP_FORWARDING} eq 'off' ) {
|
||||||
emit ' echo 0 > /proc/sys/net/ipv6/conf/all/forwarding';
|
emit ' echo 0 > /proc/sys/net/ipv6/conf/all/forwarding';
|
||||||
emit ' progress_message2 IP Forwarding Disabled!';
|
emit ' progress_message2 IPv6 Forwarding Disabled!';
|
||||||
emit '';
|
emit '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user