diff options
author | Harald Welte <laforge@osmocom.org> | 2022-05-13 08:39:17 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-05-15 10:11:28 +0200 |
commit | 35cac4dba8749fcb21e449e61ff1458744e4812b (patch) | |
tree | f78fe179ab3749be847464075d0f2e4fa379a249 /include | |
parent | 7111e00ee511fb4a47951758fa003c286b590ef8 (diff) |
smscb: "Warning Security Information is always present in ETWS
As per TS 48.049 Table 8.1.3.1.1 the WRITE-REPLACE message always
has a Warning Security Information IE if it relates to ETWS. This
is also implemented in the libosmocore CBSP parser.
As the previous Change Id369bb3676ba279bafc234378fbe21dbc7b0614b has
pointed out, the CBSP parser structure doesn't even permit any way
of handing a decoded message to us without the warning_sec_info
static struct member.
So as a result, there's also no need to dynamically allocate
bts_etws_state.input.sec_info via talloc. We can have it in-line
as a static struct member and reduce code complexity and runtime
memory allocations.
Change-Id: Ib1b8e4af37b1f9f9398b81dad29942e82218c70b
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/bsc/gsm_data.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cb20b9ed3..6df7c6193 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -29,6 +29,7 @@ #include <osmocom/gsm/rxlev_stat.h> #include <osmocom/gsm/protocol/gsm_08_58.h> #include <osmocom/gsm/protocol/gsm_12_21.h> +#include <osmocom/gsm/protocol/gsm_03_41.h> #include <osmocom/abis/e1_input.h> #include <osmocom/bsc/meas_rep.h> #include <osmocom/bsc/acc.h> @@ -1098,7 +1099,7 @@ struct bts_etws_state { uint16_t msg_id; uint16_t serial_nr; uint16_t warn_type; - uint8_t *sec_info; + uint8_t sec_info[ETWS_SEC_INFO_SIZE]; } input; /* encoded ETWS primary notification */ uint8_t primary[ETWS_PRIM_NOTIF_SIZE]; |