From 3327d2d489ba82134f37af3167fe8d8f85ef96f7 Mon Sep 17 00:00:00 2001 From: Jan Willamowius Date: Fri, 15 Dec 2017 08:51:19 +0100 Subject: [PATCH] redirect GRQ and LRQ to alternate in maintenance mode --- RasSrv.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/RasSrv.cxx b/RasSrv.cxx index 10435f3c..46928c1a 100644 --- a/RasSrv.cxx +++ b/RasSrv.cxx @@ -1746,6 +1746,11 @@ template<> bool RasPDU::Process() bReject = true; rsn = H225_GatekeeperRejectReason::e_resourceUnavailable; } + if (Toolkit::Instance()->IsMaintenanceMode()) { + PTRACE(1, "Rejecting GRQ in maintenance mode"); + bReject = true; + rsn = H225_GatekeeperRejectReason::e_resourceUnavailable; + } if (bReject) { H225_GatekeeperReject & grj = BuildReject(rsn); grj.m_protocolIdentifier = request.m_protocolIdentifier; @@ -3988,7 +3993,8 @@ template<> bool RasPDU::Process() if (Toolkit::Instance()->IsMaintenanceMode()) { PTRACE(1, "Rejecting LRQ in maintenance mode"); - BuildReject(H225_LocationRejectReason::e_requestDenied); + H225_LocationReject & lrj = BuildReject(H225_LocationRejectReason::e_resourceUnavailable); + RasSrv->SetAltGKInfo(lrj, m_msg->m_peerAddr); return true; }