Skip to content

Commit

Permalink
redirect GRQ and LRQ to alternate in maintenance mode
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Dec 15, 2017
1 parent e1d5111 commit 3327d2d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion RasSrv.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,11 @@ template<> bool RasPDU<H225_GatekeeperRequest>::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;
Expand Down Expand Up @@ -3988,7 +3993,8 @@ template<> bool RasPDU<H225_LocationRequest>::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;
}

Expand Down

0 comments on commit 3327d2d

Please sign in to comment.