changeset 1358:2f92828821dc

* src/sys/kern/kern_sysctl.c (sysctl): Update the oldlen value at the end of the sysctl call.
author asl
date Sat, 08 Nov 2003 14:37:11 +0000
parents 7b0dae4bd7a9
children 152652dea92e
files packages/net/bsd_tcpip/current/ChangeLog packages/net/bsd_tcpip/current/src/sys/kern/kern_sysctl.c
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/packages/net/bsd_tcpip/current/ChangeLog
+++ b/packages/net/bsd_tcpip/current/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-08  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* src/sys/kern/kern_sysctl.c (sysctl): Update the oldlen value at
+	the end of the sysctl call.
+
 2003-10-28  Matt Jerdonek  <maj1224@yahoo.com>
 
 	* src/sys/netinet/tcp_output.c (tcp_setpersist): Use variable
--- a/packages/net/bsd_tcpip/current/src/sys/kern/kern_sysctl.c
+++ b/packages/net/bsd_tcpip/current/src/sys/kern/kern_sysctl.c
@@ -979,6 +979,10 @@ sysctl(int *name, u_int namelen, void *o
           return -1;
         }
 
+        if (oldlenp) {
+          *oldlenp = req.oldidx;
+        }
+        
         if (req.oldptr && req.oldidx > req.oldlen)
           retval = req.oldlen;
         else