mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-11 23:53:59 +02:00
IPv6 and NetworkIPv6 dialogs load and save netmask as bit length
This commit is contained in:
@@ -116,7 +116,8 @@ void IPv6Dialog::loadFWObject(FWObject *o)
|
||||
try
|
||||
{
|
||||
if ( Interface::isA( obj->getParent() ) )
|
||||
m_dialog->netmask->setText(s->getNetmaskPtr()->toString().c_str());
|
||||
m_dialog->netmask->setText( QString("%1").arg(
|
||||
s->getNetmaskPtr()->getLength()) );
|
||||
} catch (FWException &ex) {}
|
||||
|
||||
//apply->setEnabled( false );
|
||||
@@ -214,8 +215,7 @@ void IPv6Dialog::applyChanges()
|
||||
{
|
||||
try
|
||||
{
|
||||
s->setNetmask(
|
||||
Inet6Addr(m_dialog->netmask->text().toLatin1().constData()) );
|
||||
s->setNetmask(Inet6Addr(m_dialog->netmask->text().toShort()) );
|
||||
} catch (FWException &ex) { }
|
||||
} else
|
||||
s->setNetmask(Inet6Addr());
|
||||
|
||||
@@ -166,7 +166,7 @@ void NetworkDialogIPv6::applyChanges()
|
||||
s->setAddress(
|
||||
Inet6Addr(m_dialog->address->text().toLatin1().constData()) );
|
||||
s->setNetmask(
|
||||
Inet6Addr(m_dialog->netmask->text().toLatin1().constData()) );
|
||||
Inet6Addr(m_dialog->netmask->text().toShort()) );
|
||||
} catch (FWException &ex)
|
||||
{
|
||||
/* exception thrown if user types illegal m_dialog->address or
|
||||
|
||||
Reference in New Issue
Block a user