diff -urN squid-2.6.STABLE5.orig/src/client_side.c squid-2.6.STABLE5/src/client_side.c --- squid-2.6.STABLE5.orig/src/client_side.c 2006-09-30 23:10:48.000000000 +0200 +++ squid-2.6.STABLE5/src/client_side.c 2006-11-13 21:13:45.241328717 +0100 @@ -2948,6 +2948,9 @@ memBufAppend(&mb, body_buf, body_size); } /* write */ + { int tos=isTcpHit(http->log_type) ? 0 : 8; + setsockopt(fd,SOL_IP,IP_TOS,&tos,4); + } comm_write_mbuf(http->conn->fd, mb, clientWriteComplete, http); /* clean up */ aborted: @@ -3000,6 +3003,9 @@ if (!http->request->range) { /* Avoid copying to MemBuf for non-range requests */ http->out.offset += size; + { int tos=isTcpHit(http->log_type) ? 0 : 8; + setsockopt(fd,SOL_IP,IP_TOS,&tos,4); + } comm_write(fd, buf, size, clientWriteBodyComplete, http, NULL); /* NULL because clientWriteBodyComplete frees it */ return; diff -urN squid-2.6.STABLE5.orig/src/defines.h squid-2.6.STABLE5/src/defines.h --- squid-2.6.STABLE5.orig/src/defines.h 2006-08-19 14:40:31.000000000 +0200 +++ squid-2.6.STABLE5/src/defines.h 2006-11-13 21:15:47.563667677 +0100 @@ -41,6 +41,8 @@ #define FALSE 0 #endif +#define SQUID_TCP_RCVBUF SQUID_TCP_SO_RCVBUF + /* Define load weights for cache_dir types */ #define MAX_LOAD_VALUE 1000 diff -urN squid-2.6.STABLE5.orig/src/ftp.c squid-2.6.STABLE5/src/ftp.c --- squid-2.6.STABLE5.orig/src/ftp.c 2006-09-19 01:03:36.000000000 +0200 +++ squid-2.6.STABLE5/src/ftp.c 2006-11-13 21:16:59.616675539 +0100 @@ -1152,7 +1152,7 @@ ftpState->ctrl.last_command = xstrdup("Connect to server"); ftpState->ctrl.buf = memAllocBuf(4096, &ftpState->ctrl.size); ftpState->ctrl.offset = 0; - ftpState->data.buf = memAllocBuf(SQUID_TCP_SO_RCVBUF, &ftpState->data.size); + ftpState->data.buf = memAllocBuf(SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF, &ftpState->data.size); ftpScheduleReadControlReply(ftpState, 0); } diff -urN squid-2.6.STABLE5.orig/src/http.c squid-2.6.STABLE5/src/http.c --- squid-2.6.STABLE5.orig/src/http.c 2006-10-23 23:34:17.000000000 +0200 +++ squid-2.6.STABLE5/src/http.c 2006-11-13 21:19:13.214294384 +0100 @@ -622,14 +622,14 @@ httpReadReply(int fd, void *data) { HttpStateData *httpState = data; - LOCAL_ARRAY(char, buf, SQUID_TCP_SO_RCVBUF); + LOCAL_ARRAY(char, buf, SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF); StoreEntry *entry = httpState->entry; const request_t *request = httpState->request; const request_t *orig_request = httpState->orig_request; int len; int bin; int clen; - size_t read_sz = SQUID_TCP_SO_RCVBUF; + size_t read_sz = (SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF); struct in_addr *client_addr = NULL; u_short client_port = 0; #if DELAY_POOLS