From: Pablo Neira Ayuso pablo@gnumonks.org
Hi Harald,
These are a couple of fixes that we have applied to openBSC in the CCC camp. Daniel's fixes a crash, mine fixes one malformed TCH frame issue which was the cause of quite often unexpected closures of MNCC <-> LCR connections.
You can find them in the fixes branch. Please, merge them.
Daniel Willmann (1): libbsc: Don't free secondary lchan if it is NULL.
Pablo Neira Ayuso (1): trau: fix wrong message size for GSM_TCHF_FRAME passed to MNCC
openbsc/src/libbsc/bsc_api.c | 6 +++++- openbsc/src/libtrau/trau_mux.c | 1 + 2 files changed, 6 insertions(+), 1 deletions(-)
From: Pablo Neira Ayuso pablo@gnumonks.org
During the GSM deployment in the CCC Camp, Daniel Willmann noticed that the LCR and the MNCC were closing the local connection over unix sockets communication quite so often.
After some debugging, Peter Stuge noticed that openBSC was closing the connection since write was returning 0.
Then, I suggested that it could be a malformed message with zero length. By skipping empty messages, Peter confirmed that the connection between the LCR and the MNCC was not closing anymore. However, there was no voice in the calls that went over MNCC.
After some more debugging I found that we were not building GSM_TCHF_FRAME over MNCC appropriately in the TRAU multiplexer code, since we forgot to msgb_put() the message. --- openbsc/src/libtrau/trau_mux.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/openbsc/src/libtrau/trau_mux.c b/openbsc/src/libtrau/trau_mux.c index b8b90bd..5ae5ed7 100644 --- a/openbsc/src/libtrau/trau_mux.c +++ b/openbsc/src/libtrau/trau_mux.c @@ -212,6 +212,7 @@ int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, } frame->msg_type = GSM_TCHF_FRAME; frame->callref = ue->callref; + msgb_put(msg, sizeof(struct gsm_data_frame) + 33); trau_tx_to_mncc(ue->net, msg);
return 0;
From: Daniel Willmann daniel@totalueberwachung.de
--- openbsc/src/libbsc/bsc_api.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index 70d6413..ab71ebb 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -137,7 +137,11 @@ static void assignment_t10_timeout(void *_conn) LOGP(DMSC, LOGL_ERROR, "Assigment T10 timeout on %p\n", conn);
/* normal release on the secondary channel */ - lchan_release(conn->secondary_lchan, 0, 1); + if (conn->secondary_lchan) { + lchan_release(conn->secondary_lchan, 0, 1); + } else { + LOGP(DMSC, LOGL_NOTICE, "Secondary lchan is NULL, not releasing\n"); + } conn->secondary_lchan = NULL;
/* inform them about the failure */
On Wed, Aug 10, 2011 at 02:06:34PM +0200, pablo@gnumonks.org wrote:
These are a couple of fixes that we have applied to openBSC in the CCC camp. Daniel's fixes a crash, mine fixes one malformed TCH frame issue which was the cause of quite often unexpected closures of MNCC <-> LCR connections.
thanks, applied.