* instDialog_ui_ops.cpp (verifyManagementAddress): see #2073 "Add

additional information or workflow when no management inferface
configured". The error message shown to the user when no
interfaces has been marked as "management" is now more verbose and
provides instructions how to do this. Also, if user provided
alternative address to be used to communicate with the firewall,
the check for the management interface is not performed since it
is not needed.
This commit is contained in:
Vadim Kurland
2011-02-11 14:24:09 -08:00
parent bc81cad569
commit ecdaa6f486
2 changed files with 24 additions and 6 deletions
+9
View File
@@ -1,5 +1,14 @@
2011-02-11 vadim <vadim@netcitadel.com>
* instDialog_ui_ops.cpp (verifyManagementAddress): see #2073 "Add
additional information or workflow when no management inferface
configured". The error message shown to the user when no
interfaces has been marked as "management" is now more verbose and
provides instructions how to do this. Also, if user provided
alternative address to be used to communicate with the firewall,
the check for the management interface is not performed since it
is not needed.
* configlets/bsd/update_carp: see #2078 added verbose error
message in a situation when "ifconfig carp0 create" command fails
to create CARP interface.
+15 -6
View File
@@ -1335,7 +1335,7 @@ bool instDialog::verifyManagementAddress()
/* check for a common error when none or multiple interfaces are marked as
* 'management'
*/
if (cnf.fwobj)
if (cnf.maddr.isEmpty() && cnf.fwobj)
{
int nmi = 0;
list<FWObject*> ll = cnf.fwobj->getByTypeDeep(Interface::TYPENAME);
@@ -1344,6 +1344,7 @@ bool instDialog::verifyManagementAddress()
Interface *intf = Interface::cast( *i );
if (intf->isManagement()) nmi++;
}
if (nmi>1)
{
QString err = QObject::tr("Only one interface of the firewall '%1' "
@@ -1355,10 +1356,16 @@ bool instDialog::verifyManagementAddress()
addToLog(err);
return false;
}
if (nmi==0)
{
QString err = QObject::tr("One of the interfaces of the firewall '%1' "
"must be marked as management interface.\n")
QString err = QObject::tr(
"One of the interfaces of the firewall '%1' "
"must be marked as management interface. "
"To set the management interface, double click "
"on the interface of the firewall that you will "
"connect to and check the box called Management "
"interface in the Editor panel")
.arg(QString::fromUtf8(cnf.fwobj->getName().c_str()));
QMessageBox::critical(this, "Firewall Builder", err,
@@ -1366,12 +1373,14 @@ bool instDialog::verifyManagementAddress()
addToLog(err);
return false;
}
if (cnf.maddr == "" ||
cnf.maddr == QString(InetAddr::getAny().toString().c_str()))
{
QString err = QObject::tr("Management interface does not have IP address, "
"can not communicate with the firewall.\n");
QString err = QObject::tr(
"Management interface does not have IP address, "
"can not communicate with the firewall.\n");
QMessageBox::critical(this, "Firewall Builder", err,
tr("&Continue") );
addToLog(err);