laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29496 )
Change subject: hnbap: Improve logging around HNBAP HNB Register Request
......................................................................
hnbap: Improve logging around HNBAP HNB Register Request
Change-Id: I279ef563b38fb0dd3e6a72162db91d8503f91af8
---
M src/osmo-hnbgw/hnbgw_hnbap.c
1 file changed, 9 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c
index 841fba8..1c51b63 100644
--- a/src/osmo-hnbgw/hnbgw_hnbap.c
+++ b/src/osmo-hnbgw/hnbgw_hnbap.c
@@ -399,11 +399,15 @@
HNBAP_HNBRegisterRequestIEs_t ies;
int rc;
struct osmo_plmn_id plmn;
+ struct osmo_fd *ofd = osmo_stream_srv_get_ofd(ctx->conn);
+ char name[OSMO_SOCK_NAME_MAXLEN];
+
+ osmo_sock_get_name_buf(name, sizeof(name), ofd->fd);
rc = hnbap_decode_hnbregisterrequesties(&ies, in);
if (rc < 0) {
- LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Failure to decode HNB-REGISTER-REQ from %s:
rc=%d\n",
- ctx->identity_info, rc);
+ LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Failure to decode HNB-REGISTER-REQ %s from %s:
rc=%d\n",
+ ctx->identity_info, name, rc);
return rc;
}
@@ -420,19 +424,17 @@
llist_for_each_entry(hnb, &ctx->gw->hnb_list, list) {
if (hnb->hnb_registered && ctx != hnb && memcmp(&ctx->id,
&hnb->id, sizeof(ctx->id)) == 0) {
- struct osmo_fd *ofd = osmo_stream_srv_get_ofd(ctx->conn);
- char *name = osmo_sock_get_name(ctx, ofd->fd);
LOGHNB(ctx, DHNBAP, LOGL_ERROR, "rejecting HNB-REGISTER-REQ with duplicate cell
identity "
"MCC=%u,MNC=%u,LAC=%u,RAC=%u,SAC=%u,CID=%u from %s\n",
ctx->id.mcc, ctx->id.mnc, ctx->id.lac, ctx->id.rac, ctx->id.sac,
ctx->id.cid, name);
- talloc_free(name);
hnbap_free_hnbregisterrequesties(&ies);
return hnbgw_tx_hnb_register_rej(ctx);
}
}
- 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 %s
MCC=%u,MNC=%u,LAC=%u,RAC=%u,SAC=%u,CID=%u from %s%s\n",
+ ctx->identity_info, ctx->id.mcc, ctx->id.mnc, ctx->id.lac,
ctx->id.rac, ctx->id.sac, ctx->id.cid,
+ name, ctx->hnb_registered ? " (duplicated)" : "");
ctx->hnb_registered = true;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29496
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I279ef563b38fb0dd3e6a72162db91d8503f91af8
Gerrit-Change-Number: 29496
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged