nat: Improve log messages. Refer to ip and fd.
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index 58ee6af..f69d383 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -543,13 +543,15 @@
bsc->authenticated = 1;
bsc->cfg = conf;
bsc_del_timer(&bsc->id_timeout);
- LOGP(DNAT, LOGL_NOTICE, "Authenticated bsc nr: %d lac: %d\n", conf->nr, conf->lac);
+ LOGP(DNAT, LOGL_NOTICE, "Authenticated bsc nr: %d lac: %d on fd %d\n",
+ conf->nr, conf->lac, bsc->write_queue.bfd.fd);
start_ping_pong(bsc);
return;
}
}
- LOGP(DNAT, LOGL_ERROR, "No bsc found for token %s.\n", token);
+ LOGP(DNAT, LOGL_ERROR, "No bsc found for token %s on fd: %d.\n", token,
+ bsc->write_queue.bfd.fd);
}
static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
@@ -764,7 +766,8 @@
return -2;
}
- LOGP(DNAT, LOGL_NOTICE, "Registered new BSC\n");
+ LOGP(DNAT, LOGL_NOTICE, "BSC connection on %d with IP: %s\n",
+ ret, inet_ntoa(sa.sin_addr));
llist_add(&bsc->list_entry, &nat->bsc_connections);
send_id_ack(bsc);
send_id_req(bsc);