Re: [PATCH][IPv6]: Fix incorrect length check in rawv6_sendmsg()
From: David Miller <davem@davemloft.net>
Date: 2007-03-29 21:26:56
From: David Miller <davem@davemloft.net>
Date: 2007-03-29 21:26:56
From: Sridhar Samudrala <redacted> Date: Thu, 29 Mar 2007 14:17:28 -0700
The check for length in rawv6_sendmsg() is incorrect. As len is an unsigned int, (len < 0) will never be TRUE. I think checking for IPV6_MAXPLEN(65535) is better. Is it possible to send ipv6 jumbo packets using raw sockets? If so, we can remove this check.
I don't see why such a limitation against jumbo would exist, does anyone else? Thanks for catching this Sridhar. A good compiler should simply fail to compile "if (x < 0)" when 'x' is an unsigned type, don't you think :-)