nat: Print the IP address of the BSC that does not respond to the query.

This commit is contained in:
Holger Hans Peter Freyther 2010-04-17 07:58:17 +02:00
parent 8139553962
commit 6d5a60041a
1 changed files with 6 additions and 1 deletions

View File

@ -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);
}