gsm_04_08.c: Some spoofing protection against two location updating requests

Do not allow two location updating requests on the same lchan. Such
an event is certainly spoofed and can confuse the internal logic of
the application. Prevent that.
diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index 7e448dd..83f38dd 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -593,6 +593,17 @@
 	DEBUGP(DMM, "LUPDREQ: mi_type=0x%02x MI(%s) type=%s\n", mi_type, mi_string,
 		lupd_name(lu->type));
 
+	/*
+	 * Pseudo Spoof detection: Just drop a second/concurrent
+	 * location updating request.
+	 */
+	if (lchan->loc_operation) {
+		DEBUGP(DMM, "LUPDREQ: ignoring request due an existing one: %p.\n",
+			lchan->loc_operation);
+		gsm0408_loc_upd_rej(lchan, GSM48_REJECT_PROTOCOL_ERROR);
+		return 0;
+	}
+
 	allocate_loc_updating_req(lchan);
 
 	switch (mi_type) {