From 92dbff008a54540159bbb4c0ff19ccf224155d76 Mon Sep 17 00:00:00 2001 From: Zhuofei Wang Date: Sat, 27 Jan 2024 22:02:10 +0800 Subject: [PATCH] Fix: wrong port number in redudp log while closing socket --- redudp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redudp.c b/redudp.c index bee36e7..1434c77 100644 --- a/redudp.c +++ b/redudp.c @@ -225,7 +225,7 @@ static void bound_udp_action(const void *nodep, const VISIT which, const int dep inet_ntop(datap->key.sa_family, &datap->key.sin_addr, &buf[0], sizeof(buf)); log_error(LOG_DEBUG, "Close UDP socket %d to %s:%u", datap->fd, - &buf[0], datap->key.sin_port); + &buf[0], ntohs(datap->key.sin_port)); close(datap->fd); free(datap); }