mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-25 12:47:44 +01:00
support for IPv6 child objects for Interface
This commit is contained in:
parent
7362e9129a
commit
3f6a64dadb
@ -343,6 +343,7 @@ bool FWBTree::validateForInsertion(FWObject *target,FWObject *obj)
|
||||
if (Host::isA(target) && Interface::isA(obj)) return true;
|
||||
if (Firewall::isA(target) && Interface::isA(obj)) return true;
|
||||
if (Interface::isA(target) && IPv4::isA(obj)) return true;
|
||||
if (Interface::isA(target) && IPv6::isA(obj)) return true;
|
||||
if (Interface::isA(target) && physAddress::isA(obj)) return true;
|
||||
|
||||
QString parentType = systemGroupTypes[obj->getTypeName().c_str()];
|
||||
|
||||
@ -516,6 +516,7 @@ void ObjectManipulator::autorename(FWObject *obj,bool ask)
|
||||
for (list<FWObject*>::iterator i=il.begin(); i!=il.end(); ++i)
|
||||
{
|
||||
autorename(*i,IPv4::TYPENAME,"ip");
|
||||
autorename(*i,IPv6::TYPENAME,"ip6");
|
||||
autorename(*i,physAddress::TYPENAME,"mac");
|
||||
}
|
||||
}
|
||||
@ -542,6 +543,7 @@ void ObjectManipulator::autorename(FWObject *obj,bool ask)
|
||||
0, 1 )==0 )
|
||||
{
|
||||
autorename(obj,IPv4::TYPENAME,"ip");
|
||||
autorename(obj,IPv6::TYPENAME,"ip6");
|
||||
autorename(obj,physAddress::TYPENAME,"mac");
|
||||
}
|
||||
}
|
||||
@ -1186,7 +1188,7 @@ QString s3 = obj->getTypeName().c_str();
|
||||
moveMenuItem = false;
|
||||
|
||||
// can't move ip addresses if parent is interface
|
||||
if (IPv4::isA(obj) && Interface::isA(obj->getParent()))
|
||||
if (IPv4::isA(obj) && IPv6::isA(obj) && Interface::isA(obj->getParent()))
|
||||
moveMenuItem = false;
|
||||
|
||||
// can't move physAddress objects
|
||||
@ -1596,7 +1598,7 @@ FWObject* ObjectManipulator::pasteTo(FWObject *target,FWObject *obj,
|
||||
bool openobj,bool validateOnly, bool renew_id)
|
||||
{
|
||||
FWObject *ta=target;
|
||||
if (IPv4::isA(ta)) ta=ta->getParent();
|
||||
if (IPv4::isA(ta) || IPv6::isA(ta)) ta=ta->getParent();
|
||||
try
|
||||
{
|
||||
/* clipboard holds a copy of the object */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user