Skip to content

Changes

Summary

  1. 3-digit MNC: use osmo_plmn_id in struct umts_cell_id (details)
Commit 2f0c75e93c7193e3f903f2a9be76f128531ef7b7 by nhofmeyr
3-digit MNC: use osmo_plmn_id in struct umts_cell_id

Properly represent the mnc_3_digits flag in umts_cell_id, and preserve
the three digit indicator as received on the wire.

== hnb_persistent_list:

The cell id is used as primary key in the list of hnb_persistent
instances. This patch prevents any collisions between 2-digit and
3-digit MNCs (however unlikely in practice this may be).

== nft_kpi.c:

Just like the cell ids in hnb_persistent, the ids' strings are used as
primary key in nftables rulesets in nft_kpi.c -- also prevent MNC
collisions there:

Properly transport the 3-digit property in conversions:
  struct umts_cell_id <-> string
Uncouple to_str conversion from the PLMN set in the hnbgw VTY cfg.

Before this patch, the indicator for a three digit MNC received on the
wire was discarded, and instead g_hnbgw->config.plmn.mnc_3_digits was
used to convert any PLMN to string, whether it had 3 digits or not.

Related: OS#6457
Change-Id: Id9a91c80cd2745424a916aef4736993bb7cd8ba0
The file was modified tests/umts_cell_id/umts_cell_id_test.c
The file was modified include/osmocom/hnbgw/hnbgw.h
The file was modified src/osmo-hnbgw/hnbgw_hnbap.c
The file was modified tests/umts_cell_id/umts_cell_id_test.ok
The file was modified src/osmo-hnbgw/hnbgw_vty.c
The file was modified src/osmo-hnbgw/hnbgw.c