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
This commit is contained in:
pluknet 2011-06-28 08:41:44 +00:00
parent 6e85d84e2d
commit 29ff2b4aff

View File

@ -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