From 55239c2cca8f765520cfe33df51616dab65dd02c Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 27 Sep 2022 14:45:05 +0200 Subject: [PATCH] hnbap: Accept duplicated HNB Register Request on same conn As per what's indicated in 3GPP TS 25.469 8.2.4 Abnormal Conditions: """ If the HNB-GW receives a duplicate HNB REGISTER REQUEST (i.e. for an already registered HNB identified by the unique HNB identity), then the new HNB REGISTER REQUEST shall override the existing registration and the handling of the new HNB REGISTER REQUEST is according to section 8.2. """ Related: SYS#6113 Change-Id: I0250350a14a87498a2c68cd0c726ee2f1e72419d --- src/osmo-hnbgw/hnbgw_hnbap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c index c10864a..841fba8 100644 --- a/src/osmo-hnbgw/hnbgw_hnbap.c +++ b/src/osmo-hnbgw/hnbgw_hnbap.c @@ -431,9 +431,10 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in) } } - ctx->hnb_registered = true; + LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "HNB-REGISTER-REQ from %s%s\n", ctx->identity_info, + ctx->hnb_registered ? " (duplicated)" : ""); - LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "HNB-REGISTER-REQ from %s\n", ctx->identity_info); + ctx->hnb_registered = true; /* Send HNBRegisterAccept */ rc = hnbgw_tx_hnb_register_acc(ctx); @@ -550,9 +551,8 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, HNBAP_InitiatingMess } } else { switch (imsg->procedureCode) { - case HNBAP_ProcedureCode_id_HNBRegister: /* 8.2 */ - LOGHNB(hnb, DHNBAP, LOGL_NOTICE, - "HNBAP Procedure HNB-Register not permitted for registered HNB\n"); + case HNBAP_ProcedureCode_id_HNBRegister: /* 8.2.4: Abnormal Condition, Accept. */ + rc = hnbgw_rx_hnb_register_req(hnb, &imsg->value); break; case HNBAP_ProcedureCode_id_HNBDe_Register: /* 8.3 */ rc = hnbgw_rx_hnb_deregister(hnb, &imsg->value);