nat: Free the endpoint when we get an empty CI.
In case the BSC is sending us an empty/unused CI we have a bug, but for now let us free the endpoint and figure out which response we are getting.
This commit is contained in:
parent
4634013cde
commit
b84b5f61ac
|
@ -314,6 +314,13 @@ void bsc_mgcp_forward(struct bsc_connection *bsc, struct msgb *msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
endp->ci = bsc_mgcp_extract_ci((const char *) msg->l2h);
|
endp->ci = bsc_mgcp_extract_ci((const char *) msg->l2h);
|
||||||
|
if (endp->ci == CI_UNUSED) {
|
||||||
|
LOGP(DMGCP, LOGL_ERROR, "No CI, freeing endpoint 0x%x\n",
|
||||||
|
ENDPOINT_NUMBER(endp));
|
||||||
|
bsc_mgcp_free_endpoint(bsc->nat, ENDPOINT_NUMBER(endp));
|
||||||
|
mgcp_free_endp(endp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* free some stuff */
|
/* free some stuff */
|
||||||
talloc_free(bsc_endp->transaction_id);
|
talloc_free(bsc_endp->transaction_id);
|
||||||
|
|
Loading…
Reference in New Issue