]> git.meshlink.io Git - meshlink/commitdiff
Fix warning message when setting SO_RCVBUF or SO_SNDBUF fails.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 13 Nov 2010 20:34:59 +0000 (21:34 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 13 Nov 2010 20:34:59 +0000 (21:34 +0100)
src/net_socket.c

index 20029e879c9a8bc6ded454abfbb12f878d8d45f9..2e6b068552d3838cbeb175c32f97637cf7d83fcc 100644 (file)
@@ -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)