From a9445e38f25bd24eca289768fc46e44e36b842ac Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 13 Nov 2010 21:34:59 +0100 Subject: [PATCH] Fix warning message when setting SO_RCVBUF or SO_SNDBUF fails. --- src/net_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net_socket.c b/src/net_socket.c index 20029e87..2e6b0685 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -264,10 +264,10 @@ int setup_vpn_in_socket(const sockaddr_t *sa) { setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, (void *)&option, sizeof(option)); if(udp_rcvbuf && setsockopt(nfd, SOL_SOCKET, SO_RCVBUF, (void *)&udp_rcvbuf, sizeof(udp_rcvbuf))) - logger(LOG_WARNING, "Can't set UDP SO_RCVBUF to %i: %s", option, strerror(errno)); + logger(LOG_WARNING, "Can't set UDP SO_RCVBUF to %i: %s", udp_rcvbuf, strerror(errno)); if(udp_sndbuf && setsockopt(nfd, SOL_SOCKET, SO_SNDBUF, (void *)&udp_sndbuf, sizeof(udp_sndbuf))) - logger(LOG_WARNING, "Can't set UDP SO_SNDBUF to %i: %s", option, strerror(errno)); + logger(LOG_WARNING, "Can't set UDP SO_SNDBUF to %i: %s", udp_sndbuf, strerror(errno)); #if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY) if(sa->sa.sa_family == AF_INET6) -- 2.39.5