HNBAP: Send HNB-REGISTER-REJ on ASN.1 decoding error

Change-Id: Ic4a40966194a57cccc0eb056233f7e7426d6e8f9
This commit is contained in:
Harald Welte 2024-03-27 12:59:49 +01:00
parent 8a543cf66c
commit 77a6bde3ea
1 changed files with 3 additions and 1 deletions

View File

@ -420,7 +420,9 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in)
rc = hnbap_decode_hnbregisterrequesties(&ies, in);
if (rc < 0) {
LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Failure to decode HNB-REGISTER-REQ: rc=%d\n", rc);
return rc;
cause.present = HNBAP_Cause_PR_protocol;
cause.choice.radioNetwork = HNBAP_CauseProtocol_unspecified;
return hnbgw_tx_hnb_register_rej(ctx, &cause);
}
asn1_strncpy(identity_str, &ies.hnB_Identity.hNB_Identity_Info, sizeof(identity_str));