ip6opt.c
Hiroki Sato
hrs at FreeBSD.org
Mon Feb 3 20:27:19 UTC 2014
Eitan Adler <lists at eitanadler.com> wrote
in <CAF6rxgmQMXKDMETRPRE-QkQwGS3vgZxQRFKoe6d3_BycQOouYw at mail.gmail.com>:
li> Hi all,
li>
li> DragonFly recently committed the following change and it seems that it
li> applies to us as well.
li>
li> http://gitweb.dragonflybsd.org/dragonfly.git/blobdiff/5764e12516158974fac10d50dbd2df76ce1ab007..98651c6e0e1c3b7a6b8650b55b473fcc745a22b7:/lib/libc/net/ip6opt.c
li>
li> Should I commit it?
Just out of curiousity, what is the problem with returning -1 when
(extbuf == NULL) && (extlen % 8) != 0?
li>
li> Index: ip6opt.c
li> ===================================================================
li> --- ip6opt.c (revision 261405)
li> +++ ip6opt.c (working copy)
li> @@ -381,11 +381,8 @@ inet6_opt_init(void *extbuf, socklen_t extlen)
li> {
li> struct ip6_ext *ext = (struct ip6_ext *)extbuf;
li>
li> - if (extlen < 0 || (extlen % 8))
li> - return(-1);
li> -
li> if (ext) {
li> - if (extlen == 0)
li> + if (extlen == 0 || (extlen % 8))
li> return(-1);
li> ext->ip6e_len = (extlen >> 3) - 1;
li> }
li>
li>
li> --
li> Eitan Adler
li> _______________________________________________
li> freebsd-net at freebsd.org mailing list
li> http://lists.freebsd.org/mailman/listinfo/freebsd-net
li> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
li>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20140204/a51f9d30/attachment.sig>
More information about the freebsd-net
mailing list