mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6379 from Icinga/global-zone-validation
Throw config error when using global zones as parent
This commit is contained in:
commit
038b2fb94c
|
@ -33,6 +33,9 @@ void Zone::OnAllConfigLoaded()
|
|||
|
||||
m_Parent = Zone::GetByName(GetParentRaw());
|
||||
|
||||
if (m_Parent && m_Parent->IsGlobal())
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Zone '" + GetName() + "' can not have a global zone as parent.", GetDebugInfo()));
|
||||
|
||||
Zone::Ptr zone = m_Parent;
|
||||
int levels = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue