core: print tos value if socket option for it cannot be set
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 5 May 2016 08:10:59 +0000 (10:10 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 5 May 2016 08:10:59 +0000 (10:10 +0200)
- to help with GH #598

tcp_main.c

index 578f7d2..d147257 100644 (file)
@@ -2751,7 +2751,7 @@ int tcp_init(struct socket_info* sock_info)
        optval = tos;
        if (setsockopt(sock_info->socket, IPPROTO_IP, IP_TOS, (void*)&optval, 
                                sizeof(optval)) ==-1){
-               LM_WARN("setsockopt tos: %s\n", strerror(errno));
+               LM_WARN("setsockopt tos: %s (%d)\n", strerror(errno), tos);
                /* continue since this is not critical */
        }
 #ifdef HAVE_TCP_DEFER_ACCEPT