diff --git a/lib/socket.c b/lib/socket.c index f1a1e15..e26230e 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -1073,7 +1073,10 @@ iscsi_tcp_service(struct iscsi_context *iscsi, int revents) } if (getsockname(iscsi->fd, (struct sockaddr *) &local, &local_l) == 0) { - ISCSI_LOG(iscsi, 2, "connection established to %s", iscsi->connected_portal); + char ip[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, &local.sin_addr, ip, sizeof(ip)); + ISCSI_LOG(iscsi, 2, "connection established (%s:%u -> %s)", ip, + (unsigned)ntohs(local.sin_port), iscsi->connected_portal); } iscsi->is_connected = 1;