mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-bts.git
synced 2025-11-03 05:33:26 +00:00
Handle empty (idle) PDCH blocks gracefully
An empty PDCH block contains no payload, sysmo-bts and similar BTS models crash, because they expect the msg->l2h to be set. The function l1sap_pdch_req() will not set msg->l2h for empty PDCH blocks, so these models crash. The current osmo-pcu does not send empty PDCH blocks to these BTS models. But there shouldn't be a crash, if we receive empty PDCH blocks over the PCU socket interface. Change-Id: Icb52c896766425fcf453c65530c4c0b8d06b8821
This commit is contained in:
@@ -347,7 +347,7 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg,
|
||||
abort();
|
||||
}
|
||||
|
||||
len = msgb_l2len(msg);
|
||||
len = (msg->l2h) ? msgb_l2len(msg) : 0;
|
||||
|
||||
chan_nr = l1sap->u.data.chan_nr;
|
||||
link_id = l1sap->u.data.link_id;
|
||||
|
||||
@@ -392,7 +392,7 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg,
|
||||
abort();
|
||||
}
|
||||
|
||||
len = msgb_l2len(msg);
|
||||
len = (msg->l2h) ? msgb_l2len(msg) : 0;
|
||||
|
||||
chan_nr = l1sap->u.data.chan_nr;
|
||||
link_id = l1sap->u.data.link_id;
|
||||
|
||||
@@ -479,7 +479,7 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg,
|
||||
abort();
|
||||
}
|
||||
|
||||
len = msgb_l2len(msg);
|
||||
len = (msg->l2h) ? msgb_l2len(msg) : 0;
|
||||
|
||||
chan_nr = l1sap->u.data.chan_nr;
|
||||
link_id = l1sap->u.data.link_id;
|
||||
|
||||
@@ -344,7 +344,7 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg,
|
||||
abort();
|
||||
}
|
||||
|
||||
len = msgb_l2len(msg);
|
||||
len = (msg->l2h) ? msgb_l2len(msg) : 0;
|
||||
|
||||
chan_nr = l1sap->u.data.chan_nr;
|
||||
link_id = l1sap->u.data.link_id;
|
||||
|
||||
Reference in New Issue
Block a user