bsc_api: Only forward L3 messages when the channel is active
Avoid forwarding messages from a channel that is already being closed. Harald has forwarded a crash report where this was failing.
This commit is contained in:
parent
952db280bd
commit
49ab278b6f
|
@ -29,6 +29,7 @@
|
|||
#include <openbsc/abis_rsl.h>
|
||||
#include <openbsc/chan_alloc.h>
|
||||
#include <openbsc/handover.h>
|
||||
#include <openbsc/debug.h>
|
||||
|
||||
#include <osmocore/talloc.h>
|
||||
|
||||
|
@ -94,6 +95,12 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id)
|
|||
struct gsm_lchan *lchan;
|
||||
|
||||
lchan = msg->lchan;
|
||||
if (lchan->state != LCHAN_S_ACTIVE) {
|
||||
LOGP(DRSL, LOGL_ERROR, "Got data in non active state. discarding.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if (lchan->conn) {
|
||||
api->dtap(lchan->conn, msg);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue