mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Handle case where --to-destination is followed by a bare IPv6 address
https://github.com/webmin/webmin/issues/2434
This commit is contained in:
@@ -141,6 +141,12 @@ if (($table->{'name'} eq 'nat' && $rule->{'chain'} ne 'POSTROUTING') &&
|
||||
$dpfrom = $2;
|
||||
$dpto = $4;
|
||||
}
|
||||
elsif (&check_ipvx_ipaddress($rule->{'to-destination'}->[1])) {
|
||||
$dipfrom = $rule->{'to-destination'}->[1];
|
||||
$dipto = "";
|
||||
$dpfrom = "";
|
||||
$dpto = "";
|
||||
}
|
||||
}
|
||||
print &ui_table_row($text{'edit_dnat'},
|
||||
&ui_radio("dnatdef", $dipfrom eq "" ? 1 : 0,
|
||||
|
||||
@@ -39,7 +39,7 @@ else {
|
||||
"icmp6-addr-unreachable", "icmp6-port-unreachable",
|
||||
"echo-reply", "tcp-reset" );
|
||||
|
||||
$ipvx_todestpattern='^\[([0-9A-Fa-f:]+)](\-([0-9A-Fa-f:]+))?(:(\d+)(\-(\d+))?)?$';
|
||||
$ipvx_todestpattern='^\[([0-9A-Fa-f:]+)\](\-([0-9A-Fa-f:]+))?(:(\d+)(\-(\d+))?)?$';
|
||||
|
||||
# set IP Version
|
||||
&set_ipvx_version('ipv6');
|
||||
|
||||
Reference in New Issue
Block a user