aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-08-20 05:51:04 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2019-08-20 05:51:04 +0200
commita3cccdc51c47fb4c8a5bb4ceb9c839aaab03be77 (patch)
tree1d70f624c637c8bbef5fe07bd44a5069e2346310
parent505fa9eae765a31289e3a1743f606e83b9cd65d0 (diff)
hnb register: on duplicate cells, log both cells
-rw-r--r--src/hnbgw_hnbap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 2d67219..142b0d5 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -437,10 +437,14 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in)
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);
+ struct osmo_fd *ofd2 = osmo_stream_srv_get_ofd(hnb->conn);
+ char *name2 = ofd2 ? osmo_sock_get_name(ctx, ofd2->fd) : "(null)";
LOGP(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);
+ "MCC=%u,MNC=%u,LAC=%u,RAC=%u,SAC=%u,CID=%u from %s"
+ ", duplicates %s\n",
+ ctx->id.mcc, ctx->id.mnc, ctx->id.lac, ctx->id.rac, ctx->id.sac, ctx->id.cid, name, name2);
talloc_free(name);
+ talloc_free(name2);
return hnbgw_tx_hnb_register_rej(ctx);
}
}