mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
bsc: Some S_LCHAN signals don't provide an lchan
Check the signal and only continue if it is any of the signals we want to handle. In the case of measurement reports we would cast some random code to a lchan.
This commit is contained in:
@@ -606,6 +606,20 @@ static int bsc_handle_lchan_signal(unsigned int subsys, unsigned int signal,
|
||||
if (subsys != SS_LCHAN)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Check if it is any of the signals we handle. We do want
|
||||
* to do this early as we will need to check the lchan and
|
||||
* the bsc api in it.
|
||||
*/
|
||||
switch (signal) {
|
||||
case S_LCHAN_UNEXPECTED_RELEASE:
|
||||
case S_LCHAN_ACTIVATE_ACK:
|
||||
case S_LCHAN_ACTIVATE_NACK:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
lchan = (struct gsm_lchan *)signal_data;
|
||||
if (!lchan || !lchan->conn)
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user