diff options
author | Matt Johnston <matt@ucc.asn.au> | 2011-10-26 16:02:06 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2011-10-26 16:02:06 +0000 |
commit | 790ef0deec8f11b88d5ed520ffdbe54f1b6aef22 (patch) | |
tree | c2a1d2e509bce7dbd44d4ac6711e22e06ddd97e9 /dbutil.c | |
parent | ec02dad0737eea2f549bb50e39b7a634dd895835 (diff) | |
download | dropbear-790ef0deec8f11b88d5ed520ffdbe54f1b6aef22.tar.gz |
Set IPTOS_LOWDELAY for IPv6 too
Diffstat (limited to 'dbutil.c')
-rw-r--r-- | dbutil.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -161,10 +161,12 @@ static void set_sock_priority(int sock) { val = 1; setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*)&val, sizeof(val)); - /* set the TOS bit. note that this will fail for ipv6, I can't find any - * equivalent. */ + /* set the TOS bit for either ipv4 or ipv6 */ #ifdef IPTOS_LOWDELAY val = IPTOS_LOWDELAY; +#ifdef IPPROTO_IPV6 + setsockopt(sock, IPPROTO_IPV6, IPV6_TCLASS, (void*)&val, sizeof(val)); +#endif setsockopt(sock, IPPROTO_IP, IP_TOS, (void*)&val, sizeof(val)); #endif |