osmo-iuh/include/osmocom
Stefan Sperling c964a2cfa1 ensure unique CellIDs in HNB-GW
If we receive a HNB-REGISTER-REQ with a cell ID which is already used
by another registered NNB, log an error and send HNB-REGISTER-REJECT.

Tested manually by running two 'hnb-test' programs concurrently (they
need to listen on different telnet ports; this port is hard-coded so
I compiled two different hnb-test binaries).
Then I issued the 'hnbap hnb register' command on the telnet interface
of each, and verified that the correct action is logged by osmo-hnbgw.
Both hnb-test programs can connect, but only one of them can register
at a time. Killing a registered 'hnb-test' program terminates its
connection and allows the previously rejected one to register.

The new rejection log message looks like this:
 hnbgw_hnbap.c:429 rejecting HNB-REGISTER-REQ with duplicate cell
 identity MCC=901,MNC=99,LAC=49406,RAC=66,SAC=43947,CID=182250155
 from (r=127.0.0.1:42828<->l=127.0.0.1:29169)

This change depends on a new API in libosmo-netif, which is added in
https://gerrit.osmocom.org/#/c/6844/

Change-Id: Iffd441eb2b6b75dfbe001b49b01bea015ca6e11c
Depends: I8ed78fe39c463e9018756700d13ee5ebe003b57f
Related: OS#2789
2018-02-22 20:29:06 +00:00
..
hnbap build: distcheck: add missing distclean files 2016-09-09 06:43:31 +00:00
iuh ensure unique CellIDs in HNB-GW 2018-02-22 20:29:06 +00:00
ranap iu: iu_helpers: add functions to decode ip/port from rab-ass 2017-12-20 16:03:19 +00:00
rua build: move headers to include/osmocom/* 2016-09-09 06:43:32 +00:00
Makefile.am hnbgw vty: add empty hnbgw and hnbgw/iuh vty nodes 2016-08-18 03:21:22 +02:00