aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-06-29 16:24:42 +0200
committerHarald Welte <laforge@gnumonks.org>2016-07-11 19:19:05 +0000
commit575420637981828b64c1292ada015d7170b89390 (patch)
treee488858e289f79b1c288d885af525a5ab5f35550 /openbsc/src/libmgcp
parent176b62a80c0170f1b9a1578d0b16c3ef27cf1a8f (diff)
osmux: Add negotiation state so race conditions can't disable osmux
Without this commit it is possible that osmux is disabled again on links with high jitter. This happens when an MGCP response without X-Osmux header is received before the NAT receives an Osmux dummy frame from the other side. Ticket: SYS#2628, SYS#2627 Sponsored-by: On-Waves ehf Change-Id: Id624b0279aee5e2412059a10296ce7896e2d4628
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r--openbsc/src/libmgcp/mgcp_protocol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 1819ceaf9..ff0fc3e7e 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -277,7 +277,7 @@ static struct msgb *create_response_with_sdp(struct mgcp_endpoint *endp,
if (!addr)
addr = mgcp_net_src_addr(endp);
- if (endp->osmux.state == OSMUX_STATE_ACTIVATING)
+ if (endp->osmux.state == OSMUX_STATE_NEGOTIATING)
sprintf(osmux_extension, "\nX-Osmux: %u", endp->osmux.cid);
else
osmux_extension[0] = '\0';
@@ -811,13 +811,13 @@ mgcp_header_done:
if (endp->ci == CI_UNUSED)
goto error2;
- /* Annotate Osmux circuit ID and set it to activating state until this
+ /* Annotate Osmux circuit ID and set it to negotiating state until this
* is fully set up from the dummy load.
*/
endp->osmux.state = OSMUX_STATE_DISABLED;
if (osmux_cid >= 0) {
endp->osmux.cid = osmux_cid;
- endp->osmux.state = OSMUX_STATE_ACTIVATING;
+ endp->osmux.state = OSMUX_STATE_NEGOTIATING;
} else if(endp->cfg->osmux == OSMUX_USAGE_ONLY) {
LOGP(DMGCP, LOGL_ERROR,
"Osmux only and no osmux offered on 0x%x\n", ENDPOINT_NUMBER(endp));