protocol: prohibit wildcarded requests for MDCX and DLCX
When a wildcarded request is made with a DLCX or MDCX command the MGW will search for a free endpoint and continues the command execution with that endpoint. - Catch the wildcarded request early on DLCX and MDCX and return with an error code. See also TTCN3 testcases: MGCP_Test.TC_mdcx_wildcarded MGCP_Test.TC_dlcx_wildcarded Change-Id: Ia77d44a6a86083e62338e5845b553e5cf13ebd10
This commit is contained in:
parent
19d640e806
commit
5656fbf49d
|
@ -739,6 +739,14 @@ static struct msgb *handle_modify_con(struct mgcp_parse_data *p)
|
|||
|
||||
LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n");
|
||||
|
||||
/* Prohibit wildcarded requests */
|
||||
if (endp->wildcarded_req) {
|
||||
LOGP(DLMGCP, LOGL_ERROR,
|
||||
"MDCX: endpoint:0x%x wildcarded endpoint names not supported.\n",
|
||||
ENDPOINT_NUMBER(endp));
|
||||
return create_err_response(endp, 507, "MDCX", p->trans);
|
||||
}
|
||||
|
||||
if (llist_count(&endp->conns) <= 0) {
|
||||
LOGP(DLMGCP, LOGL_ERROR,
|
||||
"MDCX: endpoint:0x%x endpoint is not holding a connection.\n",
|
||||
|
@ -912,6 +920,14 @@ static struct msgb *handle_delete_con(struct mgcp_parse_data *p)
|
|||
"DLCX: endpoint:0x%x deleting connection ...\n",
|
||||
ENDPOINT_NUMBER(endp));
|
||||
|
||||
/* Prohibit wildcarded requests */
|
||||
if (endp->wildcarded_req) {
|
||||
LOGP(DLMGCP, LOGL_ERROR,
|
||||
"DLCX: endpoint:0x%x wildcarded endpoint names not supported.\n",
|
||||
ENDPOINT_NUMBER(endp));
|
||||
return create_err_response(endp, 507, "DLCX", p->trans);
|
||||
}
|
||||
|
||||
if (llist_count(&endp->conns) <= 0) {
|
||||
LOGP(DLMGCP, LOGL_ERROR,
|
||||
"DLCX: endpoint:0x%x endpoint is not holding a connection.\n",
|
||||
|
|
Loading…
Reference in New Issue