X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_socket.c;h=c167c2f3a5e00eb21f74b99897ac851b73b9404a;hp=948ce0112e9953eeb20a9c4d6054a4bf64aed25f;hb=afd342ec0c2db5f4f60d29dfec87249c7503a1f5;hpb=ac11a79ba7d56e8c770b3dd4c503b9243c4ea4e3 diff --git a/src/net_socket.c b/src/net_socket.c index 948ce011..c167c2f3 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -78,6 +78,11 @@ static void configure_tcp(connection_t *c) { option = IPTOS_LOWDELAY; setsockopt(c->socket, SOL_IP, IP_TOS, (void *)&option, sizeof(option)); #endif + +#if defined(IPPROTO_IPV6) && defined(IPV6_TCLASS) && defined(IPTOS_LOWDELAY) + option = IPTOS_LOWDELAY; + setsockopt(c->socket, IPPROTO_IPV6, IPV6_TCLASS, (void *)&option, sizeof(option)); +#endif } static bool bind_to_interface(int sd) { @@ -452,8 +457,11 @@ begin: freeaddrinfo(proxyai); } + now = time(NULL); + if(result == -1) { if(sockinprogress(sockerrno)) { + c->last_ping_time = now; c->status.connecting = true; return; }