Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Feb 2014 05:26:25 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        lists@eitanadler.com
Cc:        freebsd-net@FreeBSD.org, swildner@dragonflybsd.org
Subject:   Re: ip6opt.c
Message-ID:  <20140204.052625.1192023326694116318.hrs@allbsd.org>
In-Reply-To: <CAF6rxgmQMXKDMETRPRE-QkQwGS3vgZxQRFKoe6d3_BycQOouYw@mail.gmail.com>
References:  <CAF6rxgmQMXKDMETRPRE-QkQwGS3vgZxQRFKoe6d3_BycQOouYw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Tue_Feb__4_05_26_25_2014_679)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Eitan Adler <lists@eitanadler.com> wrote
  in <CAF6rxgmQMXKDMETRPRE-QkQwGS3vgZxQRFKoe6d3_BycQOouYw@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@freebsd.org mailing list
li> http://lists.freebsd.org/mailman/listinfo/freebsd-net
li> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
li>

----Security_Multipart(Tue_Feb__4_05_26_25_2014_679)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEABECAAYFAlLv+3EACgkQTyzT2CeTzy1WWgCffNk5/VrDoxdhFGWZIChMNEr2
33kAn0d/yAonutiC8D2Q/eSwKnpAfYIK
=wIrZ
-----END PGP SIGNATURE-----

----Security_Multipart(Tue_Feb__4_05_26_25_2014_679)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140204.052625.1192023326694116318.hrs>