Re: [squid-users] tcp_outgoing_tos doesn't work in 3.2?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 29 Dec 2012 15:59:30 +1300

On 29/12/2012 3:49 p.m., Andrew Beverley wrote:
> On Fri, 2012-12-28 at 18:13 -0800, Nick Rogers wrote:
>> 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.
> Thanks for that. I vaguely remember making that change when creating the
> v3.2 patch set, probably for no reason other than tidying up the code.
> I'll have a closer look in the next couple of weeks, unless anyone else
> does before then.

This is a bit of a strange error. Since the tos_t type is an 8-bit char.
Passing in a larger size than the object being passed means some garbage
off the stack will be passed to the setsockopt() internals.

Amos
Received on Sat Dec 29 2012 - 02:59:37 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 01 2013 - 12:00:10 MST