mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-11 15:41:41 +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
|
try
|
||||||
{
|
{
|
||||||
if ( Interface::isA( obj->getParent() ) )
|
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) {}
|
} catch (FWException &ex) {}
|
||||||
|
|
||||||
//apply->setEnabled( false );
|
//apply->setEnabled( false );
|
||||||
@@ -214,8 +215,7 @@ void IPv6Dialog::applyChanges()
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
s->setNetmask(
|
s->setNetmask(Inet6Addr(m_dialog->netmask->text().toShort()) );
|
||||||
Inet6Addr(m_dialog->netmask->text().toLatin1().constData()) );
|
|
||||||
} catch (FWException &ex) { }
|
} catch (FWException &ex) { }
|
||||||
} else
|
} else
|
||||||
s->setNetmask(Inet6Addr());
|
s->setNetmask(Inet6Addr());
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ void NetworkDialogIPv6::applyChanges()
|
|||||||
s->setAddress(
|
s->setAddress(
|
||||||
Inet6Addr(m_dialog->address->text().toLatin1().constData()) );
|
Inet6Addr(m_dialog->address->text().toLatin1().constData()) );
|
||||||
s->setNetmask(
|
s->setNetmask(
|
||||||
Inet6Addr(m_dialog->netmask->text().toLatin1().constData()) );
|
Inet6Addr(m_dialog->netmask->text().toShort()) );
|
||||||
} catch (FWException &ex)
|
} catch (FWException &ex)
|
||||||
{
|
{
|
||||||
/* exception thrown if user types illegal m_dialog->address or
|
/* exception thrown if user types illegal m_dialog->address or
|
||||||
|
|||||||
Reference in New Issue
Block a user