From owner-freebsd-net@FreeBSD.ORG Mon Feb 3 19:57:01 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4953C2F0 for ; Mon, 3 Feb 2014 19:57:01 +0000 (UTC) Received: from mail-qc0-x22b.google.com (mail-qc0-x22b.google.com [IPv6:2607:f8b0:400d:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 05D011D7C for ; Mon, 3 Feb 2014 19:57:00 +0000 (UTC) Received: by mail-qc0-f171.google.com with SMTP id n7so11984844qcx.16 for ; Mon, 03 Feb 2014 11:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to:content-type; bh=+mmWKlhgLagHgqk5ZfMTPddbaMmKAJnPF8DFFFICdtw=; b=W5aYO6eSSN47zXZ/P7nt5+i8TfOhaTXW67yXTbwchDyz4EWFq6t5PKKieVVsJKDX4t jytg3GUkLHxtmt2qp5EJVdE+JIUDaZrNl8xsbNWkkXdUJAtk2ciISM9Zjw+kQhQZtjO+ GRYaddguAHo/Y6clo9yTisw8Rxk8dc4KHY2/I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=+mmWKlhgLagHgqk5ZfMTPddbaMmKAJnPF8DFFFICdtw=; b=WXF+iZ5mip/u/+JO3yxPED5G5n0XdbLi6/k7AdswiIp+u2OJ412rCMaBa6TspN6bWj L6sVwCMmoI9hJ79fxNXpscdxkS51rPFA7FZSi/Q/ZKF9fibBC5wVTy2jpfM82Rlotzkc z+W/l+dXAlEsNGrdfliHzFkc0SNuQFAHZ2dNPyrLo6UqiK6tnhy9D62l5XQbNcbjkawn rksZHZazGPCVuaVAg2oUV10HQg48pyuqn8NLffWoYA5S+HNdLA9A3EmMQrldDr6hpu5G HjavGW0JgCmwOcSkSW819cZpqpmVP4icn7Sqlqs5U4PIAIdlmFlfmJegD5/Xmae0s/gV Dq0Q== X-Gm-Message-State: ALoCoQldcVjeoh6d07/YVZJvamCbnwVLmbiyMUb/tvLannQ1vmdorr8R5gY8bHMQjmIG168CqqDL X-Received: by 10.224.2.194 with SMTP id 2mr59920361qak.44.1391457385637; Mon, 03 Feb 2014 11:56:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.96.30.229 with HTTP; Mon, 3 Feb 2014 11:55:55 -0800 (PST) From: Eitan Adler Date: Mon, 3 Feb 2014 14:55:55 -0500 Message-ID: Subject: ip6opt.c To: "freebsd-net@freebsd.org" , swildner@dragonflybsd.org Content-Type: text/plain; charset=UTF-8 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 19:57:01 -0000 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