pespin has uploaded this change for review.

View Change

Set 'hnbap-allow-tmsi 1' by default

Due to historical reasons [0], we didn't allow UE Registration with
(P)TMSI by default, only with IMSI. The historical reasons were fixed a
long time ago, and hence why virtually every osmo-hnbgw you can find
nowadays (see doc/examples/ dir) contained an explicit "hnbap-allow-tmsi
1" to override the default behavior.

However, the fact that this was not the default behavior causes some
problems on production network which didn't have this config set
explicitly. Hence, enable it by default.

[0] Original osmo-hnbgw code in osmo-iuh.git
12181a937ff5658af49e12c57cb08ecba859e1f1 where this feature was added
explains with more detail the problem. If UE registered with TMSI, then
the HNBGW at the time didn't have information about its IMSI and hence
could not page the UE from IMSI. Since ~5.5 years ago (Sep 2019 in
osmo-sgsn.git 10b3d70fea9628eecb58f07e1bce31f63823edfb), osmo-sgsn
already sends a Common Id to the HNBGW containing the UE IMSI when it
registers, so the HNBGW has no related problem anymore.
The VTY command is left available in the event somebody wants to operate
osmo-hnbgw with a broken MSC/SGSN (like older mentioned osmo-sgsn).

Related: SYS#7430
Change-Id: I3c4c0decf34959fc2d5683b02224f27d204aa5e9
---
M doc/examples/osmo-hnbgw/osmo-hnbgw-cs7.cfg
M doc/examples/osmo-hnbgw/osmo-hnbgw-pfcp.cfg
M doc/examples/osmo-hnbgw/osmo-hnbgw.cfg
M src/osmo-hnbgw/hnbgw.c
M src/osmo-hnbgw/hnbgw_vty.c
M tests/osmo-hnbgw-vty-test.cfg
6 files changed, 4 insertions(+), 7 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/78/39978/1
diff --git a/doc/examples/osmo-hnbgw/osmo-hnbgw-cs7.cfg b/doc/examples/osmo-hnbgw/osmo-hnbgw-cs7.cfg
index 671d790..ee9c89e 100644
--- a/doc/examples/osmo-hnbgw/osmo-hnbgw-cs7.cfg
+++ b/doc/examples/osmo-hnbgw/osmo-hnbgw-cs7.cfg
@@ -13,7 +13,6 @@
plmn 001 01
iuh
local-ip 0.0.0.0
- hnbap-allow-tmsi 1
msc 0
remote-addr my-msc
sgsn 0
diff --git a/doc/examples/osmo-hnbgw/osmo-hnbgw-pfcp.cfg b/doc/examples/osmo-hnbgw/osmo-hnbgw-pfcp.cfg
index 7599427..13835ad 100644
--- a/doc/examples/osmo-hnbgw/osmo-hnbgw-pfcp.cfg
+++ b/doc/examples/osmo-hnbgw/osmo-hnbgw-pfcp.cfg
@@ -11,7 +11,6 @@
plmn 001 01
iuh
local-ip 0.0.0.0
- hnbap-allow-tmsi 1
mgw 0
remote-ip 127.0.0.1
local-port 2729
diff --git a/doc/examples/osmo-hnbgw/osmo-hnbgw.cfg b/doc/examples/osmo-hnbgw/osmo-hnbgw.cfg
index 996a3ae..dd82788 100644
--- a/doc/examples/osmo-hnbgw/osmo-hnbgw.cfg
+++ b/doc/examples/osmo-hnbgw/osmo-hnbgw.cfg
@@ -11,7 +11,6 @@
plmn 001 01
iuh
local-ip 0.0.0.0
- hnbap-allow-tmsi 1
mgw 0
remote-ip 127.0.0.1
local-port 2729
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index d4515a8..8da6364 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -975,6 +975,7 @@
/* strdup so we can easily talloc_free in the VTY code */
g_hnbgw->config.iuh_local_ip = talloc_strdup(g_hnbgw, HNBGW_LOCAL_IP_DEFAULT);
g_hnbgw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT;
+ g_hnbgw->config.hnbap_allow_tmsi = true;
g_hnbgw->config.log_prefix_hnb_id = true;
g_hnbgw->config.accept_all_hnb = true;

diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c
index 68d4b1f..d99a998 100644
--- a/src/osmo-hnbgw/hnbgw_vty.c
+++ b/src/osmo-hnbgw/hnbgw_vty.c
@@ -334,7 +334,7 @@
"hnbap-allow-tmsi (0|1)",
"Allow HNBAP UE Register messages with TMSI or PTMSI identity\n"
"Only accept IMSI identity, reject TMSI or PTMSI\n"
- "Accept IMSI, TMSI or PTMSI as UE identity\n")
+ "Accept IMSI, TMSI or PTMSI as UE identity (default)\n")
{
g_hnbgw->config.hnbap_allow_tmsi = (*argv[0] == '1');
return CMD_SUCCESS;
@@ -1039,8 +1039,8 @@
if (port && port != IUH_DEFAULT_SCTP_PORT)
vty_out(vty, " local-port %u%s", port, VTY_NEWLINE);

- if (g_hnbgw->config.hnbap_allow_tmsi)
- vty_out(vty, " hnbap-allow-tmsi 1%s", VTY_NEWLINE);
+ if (!g_hnbgw->config.hnbap_allow_tmsi)
+ vty_out(vty, " hnbap-allow-tmsi 0%s", VTY_NEWLINE);

return CMD_SUCCESS;
}
diff --git a/tests/osmo-hnbgw-vty-test.cfg b/tests/osmo-hnbgw-vty-test.cfg
index 6f9c0b6..11327a3 100644
--- a/tests/osmo-hnbgw-vty-test.cfg
+++ b/tests/osmo-hnbgw-vty-test.cfg
@@ -32,7 +32,6 @@
hnbgw
iuh
local-ip 0.0.0.0
- hnbap-allow-tmsi 1
mgw 0
remote-ip 127.0.0.1
local-port 2729

To view, visit change 39978. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I3c4c0decf34959fc2d5683b02224f27d204aa5e9
Gerrit-Change-Number: 39978
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>