Search squid archive

Re: tcp_outgoing_tos doesn't work in 3.2?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was able to come up with a patch that works in my environment by
looking at some of the changes between 3.1 and 3.2. It seems that
sizeof(tos_t) does not result in a valid setsockopt() argument,
whereas sizeof(int) that was used in  3.1.x does.

Heres the diff.

--- src/ip/Qos.cci.orig 2012-12-28 17:23:17.000000000 -0800
+++ src/ip/Qos.cci 2012-12-28 17:21:56.000000000 -0800
@@ -5,7 +5,7 @@
 Ip::Qos::setSockTos(const Comm::ConnectionPointer &conn, tos_t tos)
 {
 #ifdef IP_TOS
-    int x = setsockopt(conn->fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos_t));
+    int x = setsockopt(conn->fd, IPPROTO_IP, IP_TOS, &tos, sizeof(int));
     if (x < 0)
         debugs(50, 2, "Ip::Qos::setSockTos: setsockopt(IP_TOS) on "
<< conn << ": " << xstrerror());
     return x;


Also FWIW the Ip::Qos::setSockNfmark() function that is below this and
similar to the TOS code might have the same problem?

Hoping someone that can do something about it reads this. Thanks!

-Nick

On Fri, Dec 28, 2012 at 3:55 PM, Nick Rogers <ncrogers@xxxxxxxxx> wrote:
> Heres some relevant errors from full debug log.
>
> 2012/12/28 15:46:35.165 kid1| fwdConnectStart: got outgoing addr
> 0.0.0.0, tos 127
> 2012/12/28 15:46:35.169 kid1| Ip::Qos::setSockTos: setsockopt(IP_TOS)
> on local=0.0.0.0 remote=[::] FD 42 flags=1: (22) Invalid argument
>
> It looks like setsockopt arguments are wrong for FreeBSD?
>
> On Fri, Dec 28, 2012 at 3:01 PM, Nick Rogers <ncrogers@xxxxxxxxx> wrote:
>> Hi. I am new to this list and am trying to followup on the issue described here:
>>
>> http://www.squid-cache.org/mail-archive/squid-users/201211/0081.html
>>
>> I am also experiencing the exact same problem.
>>
>> Does anyone know if there has been any work/updates on fixing
>> tcp_outgoing_tos in 3.2?
>>
>> I am running squid-3.2.3 under FreeBSD 8.3. I recently upgraded from
>> squid 2.7.x. Everything works fine except for tcp_outgoing_tos (the
>> TOS bit is not changed in the outbound requests). Downgrading back to
>> 2.7 with almost the same configuration (adjusting for syntax changes)
>> fixes the problem.
>>
>> Any help is greatly appreciated.
>>
>> -Nick


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux