mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-06-24 01:49:36 +02:00
fixes #2641 "newFirewall dialog does not accept ipv6 addresses with
long prefixes". The dialog did not allow ipv6 addresses of inetrfaces with netmask > 64 bit.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2011-08-11 Vadim Kurland <vadim@netcitadel.com>
|
||||
|
||||
* InterfaceEditorWidget.cpp (validateAddress): fixes #2641
|
||||
"newFirewall dialog does not accept ipv6 addresses with long
|
||||
prefixes". The dialog did not allow ipv6 addresses of inetrfaces
|
||||
with netmask > 64 bit.
|
||||
|
||||
* newFirewallDialog.cpp (cleanup): fixes #2642 "GUI crashes if
|
||||
user cancels newFirewall dialog".
|
||||
|
||||
|
||||
@@ -377,6 +377,7 @@ bool InterfaceEditorWidget::validateAddress(const QString &addr,
|
||||
bool regular,
|
||||
bool ipv6)
|
||||
{
|
||||
|
||||
if ( regular && ( addr.isEmpty() || netm.isEmpty() ) )
|
||||
{
|
||||
setError("Firewall Builder", tr("Empty address or netmask field"));
|
||||
@@ -400,7 +401,7 @@ bool InterfaceEditorWidget::validateAddress(const QString &addr,
|
||||
int ilen = netm.toInt (&ok);
|
||||
if (ok)
|
||||
{
|
||||
if (ilen < 0 || (!ipv6 && (ilen > 32)) || (ilen>64) )
|
||||
if (ilen < 0 || (ipv6 && ilen > 128) || (!ipv6 && ilen > 32))
|
||||
{
|
||||
setError("Firewall Builder",
|
||||
tr("Invalid netmask '%1/%2'").arg(addr).arg(netm));
|
||||
|
||||
Reference in New Issue
Block a user