# HG changeset patch # User asl # Date 1068302231 0 # Node ID 2f92828821dc880b674edac2ed9c88a4c26ba2e2 # Parent 7b0dae4bd7a9765d602435d7cd95b29a5072f77f * src/sys/kern/kern_sysctl.c (sysctl): Update the oldlen value at the end of the sysctl call. diff --git a/packages/net/bsd_tcpip/current/ChangeLog b/packages/net/bsd_tcpip/current/ChangeLog --- a/packages/net/bsd_tcpip/current/ChangeLog +++ b/packages/net/bsd_tcpip/current/ChangeLog @@ -1,3 +1,8 @@ +2003-11-08 Andrew Lunn + + * src/sys/kern/kern_sysctl.c (sysctl): Update the oldlen value at + the end of the sysctl call. + 2003-10-28 Matt Jerdonek * src/sys/netinet/tcp_output.c (tcp_setpersist): Use variable diff --git a/packages/net/bsd_tcpip/current/src/sys/kern/kern_sysctl.c b/packages/net/bsd_tcpip/current/src/sys/kern/kern_sysctl.c --- 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