summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpluknet <pluknet@FreeBSD.org>2011-06-28 08:41:44 +0000
committerpluknet <pluknet@FreeBSD.org>2011-06-28 08:41:44 +0000
commit29ff2b4aff0cd24ac5e6e02ed95642fdf23c433d (patch)
treef5fd5e8851e352ed0b0a3035c5d4984c97101a09
parent6e85d84e2d4c2ca228618e0e2ca34f0423690b4d (diff)
downloadFreeBSD-src-29ff2b4aff0cd24ac5e6e02ed95642fdf23c433d.zip
FreeBSD-src-29ff2b4aff0cd24ac5e6e02ed95642fdf23c433d.tar.gz
Update ifc_len field of struct ifconf passed for the ioctl SIOCGIFCONF32
(i.e. under COMPAT_FREEBSD32) in case ifconf() returned success to match the native SIOCGIFCONF behavior. PR: kern/158369 Reported by: Paul Procacci <pprocacci att gmail com> MFC after: 1 week
-rw-r--r--sys/net/if.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index b7c2ad1..a5a3a8e 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -2467,6 +2467,8 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td)
error = ifconf(SIOCGIFCONF, (void *)&ifc);
CURVNET_RESTORE();
+ if (error == 0)
+ ifc32->ifc_len = ifc.ifc_len;
return (error);
}
#endif
OpenPOWER on IntegriCloud