Do not allow two location updating requests at the same time on the
same lchan. Such an event is certainly spoofed and can confuse the
internal logic of the application. Prevent that.
---
src/gsm_04_08.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index a91ef7a..18371b5 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -563,6 +563,12 @@ static int mm_rx_loc_upd_req(struct msgb *msg)
DEBUGP(DMM, "LUPDREQ: mi_type=0x%02x MI(%s) type=%s\n", mi_type, mi_string,
lupd_name(lu->type));
+ /* two location updating request on the same lchan... *spoof* */
+ if (lchan->loc_operation) {
+ gsm0408_loc_upd_rej(lchan, GSM48_REJECT_PROTOCOL_ERROR);
+ return 0;
+ }
+
allocate_loc_updating_req(lchan);
switch (mi_type) {
--
1.6.3.1