diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-17 07:58:17 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-17 07:58:17 +0200 |
commit | b022cc3b8e092d99088b2c03ec6ee69b5f6c1e08 (patch) | |
tree | a98cde582c9ada194c1c794accbb7a77477854fd | |
parent | e8396c966336163fa5b4ab731ac253eaa4d9e7a0 (diff) |
nat: Print the IP address of the BSC that does not respond to the query.
-rw-r--r-- | openbsc/src/nat/bsc_nat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index 4f7fde6c8..697b16217 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -458,9 +458,14 @@ static void remove_bsc_connection(struct bsc_connection *connection) static void ipaccess_close_bsc(void *data) { + struct sockaddr_in sock; + socklen_t len = sizeof(sock); struct bsc_connection *conn = data; - LOGP(DNAT, LOGL_ERROR, "BSC didn't respond to identity request. Closing.\n"); + + getpeername(conn->write_queue.bfd.fd, (struct sockaddr *) &sock, &len); + LOGP(DNAT, LOGL_ERROR, "BSC on %s didn't respond to identity request. Closing.\n", + inet_ntoa(sock.sin_addr)); remove_bsc_connection(conn); } |