Subject: Re: rip_ctloutput() and IP_HDRINCL
To: Markus Mayer <mmayer@redback.com>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 11/28/2007 00:11:43
On Tue, Nov 27, 2007 at 12:10:49PM -0800, Markus Mayer wrote:
> 
> While it may seem unnecessary at first glance to check for "bigger than 
> sizeof(int)", we actually ran into an issue because of this. Admittedly, 
> it was unclean code in the userland application, which passed the 
> address of a u_long to setsockopt() and not an int, but the kernel 
> should catch such problems and either handle them or return an error.

I'm sure I remember some code that allows for programs passing a
single byte for some of these parameters?
I think is was done for compat with programs written for a different OS.
OTOH it wasn't any of the options in tcp_usrreq.c that xtos changed.

	David

-- 
David Laight: david@l8s.co.uk