aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-06-29 12:43:09 +0200
committerHarald Welte <laforge@gnumonks.org>2011-06-29 12:43:09 +0200
commit5830bfe4111cac270db64b566dd0f615b8c17552 (patch)
treebf439e63d09e9ecf9fdee64a99f6269db7002f21
parent6818881d72cdde04eca4b1923a805190acde493c (diff)
rsl / meas rep: properly check if UNIT DATA IND is really a 04.08 meas rep
-rw-r--r--src/common/rsl.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index c9885fde..0cedbfd5 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -869,26 +869,23 @@ static int rslms_is_meas_rep(struct msgb *msg)
struct abis_rsl_rll_hdr *rllh;
struct gsm48_hdr *gh;
- if ((rh->msg_discr & 0xfe) != ABIS_RSL_MDISC_RLL) {
- DEBUGP(DRSL, "msg_disc 0x%x != RLL\n", rh->msg_discr);
+ if ((rh->msg_discr & 0xfe) != ABIS_RSL_MDISC_RLL)
return 0;
- }
- if (rh->msg_type != RSL_MT_UNIT_DATA_IND) {
- DEBUGP(DRSL, "msg_type 0x%x != UNIT_DATA_IND\n", rh->msg_type);
+ if (rh->msg_type != RSL_MT_UNIT_DATA_IND)
return 0;
- }
-#if 0
+
rllh = msgb_l2(msg);
if (rsl_link_id_is_sacch(rllh->link_id) == 0)
return 0;
+
gh = msgb_l3(msg);
if (gh->proto_discr != GSM48_PDISC_RR)
return 0;
if (gh->msg_type != GSM48_MT_RR_MEAS_REP)
return 0;
-#endif
+
return 1;
}