From owner-freebsd-net@FreeBSD.ORG Mon Feb 3 20:27:19 2014 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 688D7777 for ; Mon, 3 Feb 2014 20:27:19 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5670A10CC for ; Mon, 3 Feb 2014 20:27:18 +0000 (UTC) Received: from alph.d.allbsd.org (p2106-ipbf2009funabasi.chiba.ocn.ne.jp [114.146.169.106]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id s13KQrcM015281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Feb 2014 05:27:04 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.7/8.14.7) with ESMTP id s13KQo8U040436; Tue, 4 Feb 2014 05:26:51 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Tue, 04 Feb 2014 05:26:25 +0900 (JST) Message-Id: <20140204.052625.1192023326694116318.hrs@allbsd.org> To: lists@eitanadler.com Subject: Re: ip6opt.c From: Hiroki Sato In-Reply-To: References: X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Tue_Feb__4_05_26_25_2014_679)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Tue, 04 Feb 2014 05:27:05 +0900 (JST) X-Spam-Status: No, score=-94.3 required=13.0 tests=CONTENT_TYPE_PRESENT, RCVD_IN_PBL,RCVD_IN_RP_RNBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: freebsd-net@FreeBSD.org, swildner@dragonflybsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2014 20:27:19 -0000 ----Security_Multipart(Tue_Feb__4_05_26_25_2014_679)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eitan Adler wrote in : 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)----