From owner-svn-src-all@FreeBSD.ORG Sun Aug 10 19:14:15 2014 Return-Path: Delivered-To: svn-src-all@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 4F2D7907; Sun, 10 Aug 2014 19:14:15 +0000 (UTC) Received: from felyko.com (felyko.com [IPv6:2001:470:1:2d5:26:3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 345042560; Sun, 10 Aug 2014 19:14:15 +0000 (UTC) Received: from [IPv6:2601:9:8280:5fd:29b0:4ef8:aab2:5b94] (unknown [IPv6:2601:9:8280:5fd:29b0:4ef8:aab2:5b94]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 92E5E34AAC9; Sun, 10 Aug 2014 12:14:13 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269777 - head/sys/netinet/cc From: Rui Paulo In-Reply-To: <53e7249b.20e4.485017ca@svn.freebsd.org> Date: Sun, 10 Aug 2014 12:14:35 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <53e7249b.20e4.485017ca@svn.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 19:14:15 -0000 On Aug 10, 2014, at 0:51, Hans Petter Selasky = wrote: > Author: hselasky > Date: Sun Aug 10 07:51:55 2014 > New Revision: 269777 > URL: http://svnweb.freebsd.org/changeset/base/269777 >=20 > Log: > Fix string length argument passed to "sysctl_handle_string()" so that > the complete string is returned by the function and not just only one > byte. >=20 > PR: 192544 > MFC after: 2 weeks >=20 > Modified: > head/sys/netinet/cc/cc.c >=20 > Modified: head/sys/netinet/cc/cc.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/cc/cc.c Sun Aug 10 06:56:43 2014 = (r269776) > +++ head/sys/netinet/cc/cc.c Sun Aug 10 07:51:55 2014 = (r269777) > @@ -101,7 +101,7 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) > CC_LIST_RLOCK(); > strlcpy(default_cc, CC_DEFAULT()->name, = TCP_CA_NAME_MAX); > CC_LIST_RUNLOCK(); > - err =3D sysctl_handle_string(oidp, default_cc, 1, req); > + err =3D sysctl_handle_string(oidp, default_cc, 0, req); > } else { > /* Find algo with specified name and set it to default. = */ > CC_LIST_RLOCK(); > @@ -166,7 +166,7 @@ cc_list_available(SYSCTL_HANDLER_ARGS) >=20 > if (!err) { > sbuf_finish(s); > - err =3D sysctl_handle_string(oidp, sbuf_data(s), 1, = req); > + err =3D sysctl_handle_string(oidp, sbuf_data(s), 0, = req); > } >=20 > sbuf_delete(s); >=20 Are you sure this is still correct? The len parameter should probably = be sbuf_len(s). -- Rui Paulo