diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2020-05-18 00:48:38 +0300 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-05-19 20:33:42 +0000 |
commit | c955655b20d62e8d9cb055a3c0c17e1977e933a6 (patch) | |
tree | 59eba6640cfb7317a40ecc149dd29c3c5099c9a2 /src | |
parent | 45f73247ee0a1fe7eb946963f3f6967975080b9a (diff) |
bsc_patch: Don't even parse MM INFO if TZ patching is not enabled.
Change-Id: Ief159111b8753db83861194c2a035a1f08eb77b0
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/osmo_bsc_filter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 3b72aeeb9..b4985f286 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -49,6 +49,11 @@ static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn, uint8_t tzbsd = 0; uint8_t dst = 0; + /* Is TZ patching enabled? */ + struct gsm_tz *tz = &conn->network->tz; + if (!tz->override) + return 0; + parse_res = tlv_parse(&tp, &gsm48_mm_att_tlvdef, data, length, 0, 0); if (parse_res <= 0 && parse_res != -3) /* FIXME: -3 means unknown IE error, so this accepts messages @@ -56,11 +61,6 @@ static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn, * IE and the message is broken or parsed incompletely. */ return 0; - /* Is TZ patching enabled? */ - struct gsm_tz *tz = &conn->network->tz; - if (!tz->override) - return 0; - /* Convert tz.hr and tz.mn to units */ if (tz->hr < 0) { tzunits = -tz->hr*4; |