From: Guus Sliepen Date: Sat, 13 Nov 2010 20:34:59 +0000 (+0100) Subject: Fix warning message when setting SO_RCVBUF or SO_SNDBUF fails. X-Git-Tag: release-1.0.14~27 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=a9445e38f25bd24eca289768fc46e44e36b842ac;p=tinc Fix warning message when setting SO_RCVBUF or SO_SNDBUF fails. --- 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)