mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
Set IPTOS_LOWDELAY for IPv6 too
--HG-- extra : convert_revision : bebc84493fc5f4ca914ae8828e6db7204c086ac2
This commit is contained in:
parent
29e68e9d79
commit
1119ad3a2f
6
dbutil.c
6
dbutil.c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user