From: Jean Flach Date: Fri, 15 Jun 2018 12:40:09 +0000 (+0200) Subject: Throw config error when using global zones as parent X-Git-Tag: v2.10.0~91^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee9be90fa79934993a3754a523f0e180d71ce58d;p=icinga2 Throw config error when using global zones as parent --- diff --git a/lib/remote/zone.cpp b/lib/remote/zone.cpp index ea6e007bd..eddc3aa67 100644 --- a/lib/remote/zone.cpp +++ b/lib/remote/zone.cpp @@ -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;