svn commit: r270713 - stable/8/sys/netinet/cc

Hans Petter Selasky hselasky at FreeBSD.org
Wed Aug 27 14:13:48 UTC 2014


Author: hselasky
Date: Wed Aug 27 14:13:47 2014
New Revision: 270713
URL: http://svnweb.freebsd.org/changeset/base/270713

Log:
  MFC r269777:
  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

Modified:
  stable/8/sys/netinet/cc/cc.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/netinet/cc/cc.c
==============================================================================
--- stable/8/sys/netinet/cc/cc.c	Wed Aug 27 14:11:25 2014	(r270712)
+++ stable/8/sys/netinet/cc/cc.c	Wed Aug 27 14:13:47 2014	(r270713)
@@ -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-stable-8 mailing list