diff --git a/firewall6/config b/firewall6/config index 35a5e0d61..513319e55 100644 --- a/firewall6/config +++ b/firewall6/config @@ -4,3 +4,4 @@ view_condition=1 cluster_mode=1 comment_mod=0 force_init=0 +perpage=50 diff --git a/firewall6/config.info b/firewall6/config.info index 5963d9b1f..c0c8ccfbb 100644 --- a/firewall6/config.info +++ b/firewall6/config.info @@ -1,4 +1,5 @@ line0=Configurable options,11 +perpage=Number of rules to display per page,3,50 view_condition=Display condition in rules list?,1,1-Yes,0-No view_comment=Display comment in rules list?,1,1-Yes,0-No comment_mod=Store comments as,1,0-# comments in save file,1---comment option diff --git a/firewall6/edit_rule.cgi b/firewall6/edit_rule.cgi index b1233b1fa..c25fbd471 100755 --- a/firewall6/edit_rule.cgi +++ b/firewall6/edit_rule.cgi @@ -99,7 +99,7 @@ if (($table->{'name'} eq 'nat' && $rule->{'chain'} ne 'POSTROUTING') && ($rtofrom, $rtoto) = split(/\-/, $rule->{'to-ports'}->[1]); } print &ui_table_row($text{'edit_rtoports'}, - &ui_radio("rtodef", rtofrom eq "" ? 1 : 0, + &ui_radio("rtodef", $rtofrom eq "" ? 1 : 0, [ [ 1, $text{'default'} ], [ 0, &text('edit_prange', &ui_textbox("rtofrom", $rtofrom, 6), @@ -125,7 +125,7 @@ if (($table->{'name'} eq 'nat' && $rule->{'chain'} ne 'POSTROUTING') && &can_jump("DNAT")) { if ($rule->{'j'}->[1] eq 'DNAT') { if ($rule->{'to-destination'}->[1] =~ - /^([0-9\.]+)(\-([0-9\.]+))?(:(\d+)(\-(\d+))?)?$/) { + /^\[([0-9A-Fa-f:]+)](\-([0-9A-Fa-f:]+))?(:(\d+)(\-(\d+))?)?$/) { $dipfrom = $1; $dipto = $3; $dpfrom = $5; diff --git a/firewall6/firewall6-lib.pl b/firewall6/firewall6-lib.pl index d418c5891..8ba4c8c90 100644 --- a/firewall6/firewall6-lib.pl +++ b/firewall6/firewall6-lib.pl @@ -5,6 +5,7 @@ BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); +$config{'perpage'} ||= 50; # a value of 0 can cause problems if ($config{'save_file'}) { # Force use of a different save file, and webmin's functions $ip6tables_save_file = $config{'save_file'}; diff --git a/firewall6/index.cgi b/firewall6/index.cgi index 1314a1d98..ea20c96b9 100755 --- a/firewall6/index.cgi +++ b/firewall6/index.cgi @@ -181,6 +181,35 @@ else { print "