Project

General

Profile

Bug #4832 » 0001-spoof-LU-reject-when-there-is-no-MSC.patch

neels, 10/29/2020 12:58 AM

View differences:

src/osmo-bsc/gsm_08_08.c
41 41

  
42 42
#include <osmocom/bsc/osmo_bsc_sigtran.h>
43 43
#include <osmocom/bsc/bts.h>
44
#include <osmocom/gsm/rsl.h>
44 45

  
45 46
#define LOG_COMPL_L3(pdisc, mtype, loglevel, format, args...) \
46 47
	LOGP(DRSL, loglevel, "%s %s: " format, gsm48_pdisc_name(pdisc), gsm48_pdisc_msgtype_name(pdisc, mtype), ##args)
......
364 365
	conn_update_ms_power_class(conn, rc8);
365 366
}
366 367

  
368
static void spoof_reject(struct gsm_subscriber_connection *conn)
369
{
370
	struct msgb *msg;
371
	struct e1inp_sign_link *rsl_link;
372

  
373
	msg = gsm48_create_loc_upd_rej(GSM48_REJECT_SRV_OPT_TMP_OUT_OF_ORDER);
374
	if (!msg) {
375
		LOGP(DRSL, LOGL_ERROR, "Failed to create msg for LOCATION UPDATING REJECT.\n");
376
		return;
377
	}
378

  
379
	rsl_link = conn->lchan->ts->trx->rsl_link;
380
	msg->l3h = msg->data;
381
	rsl_rll_push_l3(msg, RSL_MT_DATA_REQ, gsm_lchan2chan_nr(conn->lchan),
382
			rsl_link->sapi, 1);
383
	msg->dst = rsl_link;
384
	abis_rsl_sendmsg(msg);
385
}
386

  
367 387
/*! MS->MSC: New MM context with L3 payload. */
368 388
int bsc_compl_l3(struct gsm_lchan *lchan, struct msgb *msg, uint16_t chosen_channel)
369 389
{
......
481 501
				     "%s%s: No suitable MSC for this Complete Layer 3 request found\n",
482 502
				     osmo_mobile_identity_to_str_c(OTC_SELECT, &mi),
483 503
				     is_emerg ? " FOR EMERGENCY CALL" : "");
504
			spoof_reject(conn);
484 505
			goto early_exit;
485 506
		}
486 507

  
(1-1/2)
Add picture from clipboard (Maximum size: 48.8 MB)