svn commit: r269777 - head/sys/netinet/cc
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Aug 10 07:51:56 UTC 2014
Author: hselasky
Date: Sun Aug 10 07:51:55 2014
New Revision: 269777
URL: http://svnweb.freebsd.org/changeset/base/269777
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.
PR: 192544
MFC after: 2 weeks
Modified:
head/sys/netinet/cc/cc.c
Modified: head/sys/netinet/cc/cc.c
==============================================================================
--- 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 = sysctl_handle_string(oidp, default_cc, 1, req);
+ err = 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)
if (!err) {
sbuf_finish(s);
- err = sysctl_handle_string(oidp, sbuf_data(s), 1, req);
+ err = sysctl_handle_string(oidp, sbuf_data(s), 0, req);
}
sbuf_delete(s);
More information about the svn-src-all
mailing list