ip6opt.c
Eitan Adler
lists at eitanadler.com
Mon Feb 3 19:57:01 UTC 2014
Hi all,
DragonFly recently committed the following change and it seems that it
applies to us as well.
http://gitweb.dragonflybsd.org/dragonfly.git/blobdiff/5764e12516158974fac10d50dbd2df76ce1ab007..98651c6e0e1c3b7a6b8650b55b473fcc745a22b7:/lib/libc/net/ip6opt.c
Should I commit it?
Index: ip6opt.c
===================================================================
--- ip6opt.c (revision 261405)
+++ ip6opt.c (working copy)
@@ -381,11 +381,8 @@ inet6_opt_init(void *extbuf, socklen_t extlen)
{
struct ip6_ext *ext = (struct ip6_ext *)extbuf;
- if (extlen < 0 || (extlen % 8))
- return(-1);
-
if (ext) {
- if (extlen == 0)
+ if (extlen == 0 || (extlen % 8))
return(-1);
ext->ip6e_len = (extlen >> 3) - 1;
}
--
Eitan Adler
More information about the freebsd-net
mailing list