summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet.c b/packet.c
index 137d0181a..56080cbb1 100644
--- a/packet.c
+++ b/packet.c
@@ -1237,7 +1237,7 @@ packet_set_interactive(int interactive, int keepalives)
1237 * Set IP options for an interactive connection. Use 1237 * Set IP options for an interactive connection. Use
1238 * IPTOS_LOWDELAY and TCP_NODELAY. 1238 * IPTOS_LOWDELAY and TCP_NODELAY.
1239 */ 1239 */
1240#ifdef IP_TOS 1240#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
1241 int lowdelay = IPTOS_LOWDELAY; 1241 int lowdelay = IPTOS_LOWDELAY;
1242 if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay, 1242 if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay,
1243 sizeof(lowdelay)) < 0) 1243 sizeof(lowdelay)) < 0)
@@ -1251,7 +1251,7 @@ packet_set_interactive(int interactive, int keepalives)
1251 * Set IP options for a non-interactive connection. Use 1251 * Set IP options for a non-interactive connection. Use
1252 * IPTOS_THROUGHPUT. 1252 * IPTOS_THROUGHPUT.
1253 */ 1253 */
1254#ifdef IP_TOS 1254#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
1255 int throughput = IPTOS_THROUGHPUT; 1255 int throughput = IPTOS_THROUGHPUT;
1256 if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput, 1256 if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput,
1257 sizeof(throughput)) < 0) 1257 sizeof(throughput)) < 0)