From f63b933136f235248b3e1abc9244d332e7b70ee1 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 11 Dec 2008 23:07:07 +0000 Subject: [PATCH] Add IP_FORWARDING back into IPv6 git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8998 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Compiler.pm | 9 +++++++++ Shorewall-perl/Shorewall/Proc.pm | 9 +++++++++ Shorewall-perl/prog.functions6 | 10 +--------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Shorewall-perl/Shorewall/Compiler.pm b/Shorewall-perl/Shorewall/Compiler.pm index f72aac445..2a868e410 100644 --- a/Shorewall-perl/Shorewall/Compiler.pm +++ b/Shorewall-perl/Shorewall/Compiler.pm @@ -544,6 +544,15 @@ EOF 'progress_message2 IP Forwarding Disabled!' ); } + } else { + if ( $config{IP_FORWARDING} eq 'on' ) { + emit( 'echo 1 > /proc/sys/net/ipv6/config/all/forwarding', + 'progress_message2 IP Forwarding Enabled' ); + } elsif ( $config{IP_FORWARDING} eq 'off' ) { + emit( 'echo 0 > /proc/sys/net/ipv6/config/all/forwarding', + 'progress_message2 IP Forwarding Disabled!' + ); + } } emit 'run_stopped_exit'; diff --git a/Shorewall-perl/Shorewall/Proc.pm b/Shorewall-perl/Shorewall/Proc.pm index 3ce45b919..e36a12e60 100644 --- a/Shorewall-perl/Shorewall/Proc.pm +++ b/Shorewall-perl/Shorewall/Proc.pm @@ -210,6 +210,15 @@ sub setup_forwarding( $ ) { emit ''; } } else { + if ( $config{IP_FORWARDING} eq 'on' ) { + emit ' echo 1 > /proc/sys/net/ipv6/config/all/forwarding'; + emit ' progress_message2 IP Forwarding Enabled'; + } elsif ( $config{IP_FORWARDING} eq 'off' ) { + emit ' echo 0 > /proc/sys/net/ipv6/config/all/forwarding'; + emit ' progress_message2 IP Forwarding Disabled!'; + emit ''; + } + my $interfaces = find_interfaces_by_option 'forward'; if ( @$interfaces ) { diff --git a/Shorewall-perl/prog.functions6 b/Shorewall-perl/prog.functions6 index 396c72e22..4fcfc11bd 100644 --- a/Shorewall-perl/prog.functions6 +++ b/Shorewall-perl/prog.functions6 @@ -10,15 +10,7 @@ clear_firewall() { run_iptables -F - echo 1 > /proc/sys/net/ipv4/ip_forward - - if [ -n "$DISABLE_IPV6" ]; then - if qt mywhich ip6tables; then - ip6tables -P INPUT ACCEPT 2> /dev/null - ip6tables -P OUTPUT ACCEPT 2> /dev/null - ip6tables -P FORWARD ACCEPT 2> /dev/null - fi - fi + echo 1 > /proc/sys/net/ipv6/config/all/forwarding run_clear_exit