diff -U 3 C:/Compare/force dns/tuned 01/optionsfw.cgi C:/Compare/force dns/tuned 02/optionsfw.cgi
--- C:/Compare/force dns/tuned 01/optionsfw.cgi Sun Nov 8 20:17:54 2020
+++ C:/Compare/force dns/tuned 02/optionsfw.cgi Sun Nov 22 20:06:56 2020
@@ -69,6 +69,31 @@
&General::readhash($filename, \%settings); # Load good settings
}
+if ($settings{'ACTION'} eq $Lang::tr{'fw settings save and restart'}) {
+ if ($settings{'defpol'} ne '1'){
+ $errormessage .= $Lang::tr{'new optionsfw later'};
+ &General::writehash($filename, \%settings); # Save good settings
+ system("/usr/local/bin/firewallctrl");
+ }else{
+ if ($settings{'POLICY'} ne ''){
+ $fwdfwsettings{'POLICY'} = $settings{'POLICY'};
+ }
+ if ($settings{'POLICY1'} ne ''){
+ $fwdfwsettings{'POLICY1'} = $settings{'POLICY1'};
+ }
+ my $MODE = $fwdfwsettings{'POLICY'};
+ my $MODE1 = $fwdfwsettings{'POLICY1'};
+ %fwdfwsettings = ();
+ $fwdfwsettings{'POLICY'} = "$MODE";
+ $fwdfwsettings{'POLICY1'} = "$MODE1";
+ &General::writehash("${General::swroot}/firewall/settings", \%fwdfwsettings);
+ &General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
+ system("/usr/local/bin/firewallctrl");
+ system("/etc/rc.d/init.d/firewall restart >/dev/null 2>&1 ");
+ }
+ &General::readhash($filename, \%settings); # Load good settings
+}
+
&Header::openpage($Lang::tr{'options fw'}, 1, '');
&Header::openbigbox('100%', 'left', '', $errormessage);
&General::readhash($filename, \%settings);
@@ -370,7 +395,8 @@