Date: Sun, 10 Aug 2014 12:14:35 -0700 From: Rui Paulo <rpaulo@FreeBSD.org> To: Hans Petter Selasky <hselasky@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r269777 - head/sys/netinet/cc Message-ID: <F3D3E23E-3704-4600-9F29-7F437E3C58F8@FreeBSD.org> In-Reply-To: <53e7249b.20e4.485017ca@svn.freebsd.org> References: <53e7249b.20e4.485017ca@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 10, 2014, at 0:51, Hans Petter Selasky <hselasky@freebsd.org> = 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F3D3E23E-3704-4600-9F29-7F437E3C58F8>