diff --git a/src/gui/ObjectManipulator.cpp b/src/gui/ObjectManipulator.cpp index 36c09729c..bed57edc0 100644 --- a/src/gui/ObjectManipulator.cpp +++ b/src/gui/ObjectManipulator.cpp @@ -964,6 +964,8 @@ QAction *movID; { newID1=popup->addAction( tr("Add IP Address"), this , SLOT( newInterfaceAddress() ) ); + newID1=popup->addAction( tr("Add IPv6 Address"), this , + SLOT( newInterfaceAddressIPv6() ) ); newID2=popup->addAction( tr("Add MAC Address"), this , SLOT( newPhysicalAddress() ) ); } @@ -2795,6 +2797,29 @@ void ObjectManipulator::newInterfaceAddress() } } +void ObjectManipulator::newInterfaceAddressIPv6() +{ + if ( currentObj->isReadOnly() ) return; + + if (Interface::isA(currentObj)) + { + Interface *intf = Interface::cast(currentObj); + if (intf && + (intf->isDyn() || intf->isUnnumbered() || intf->isBridgePort()) + ) return; + QString iname=QString("%1:%2:ipv6") + .arg(QString::fromUtf8(currentObj->getParent()->getName().c_str())) + .arg(QString::fromUtf8(currentObj->getName().c_str())); + FWObject *o=createObject(currentObj, IPv6::TYPENAME, iname); + if (o!=NULL) + { + openObject(o); + editObject(o); + updateLastModifiedTimestampForAllFirewalls(o); + } + } +} + void ObjectManipulator::newTagService() { FWObject *o; diff --git a/src/gui/ObjectManipulator.h b/src/gui/ObjectManipulator.h index f53f230dc..17b409fdc 100644 --- a/src/gui/ObjectManipulator.h +++ b/src/gui/ObjectManipulator.h @@ -179,6 +179,7 @@ public slots: void newAddress(); void newAddressIPv6(); void newInterfaceAddress(); + void newInterfaceAddressIPv6(); void newPhysicalAddress(); void newAddressRange(); void newObjectGroup();