summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-11-05 10:29:47 +0000
committerglebius <glebius@FreeBSD.org>2013-11-05 10:29:47 +0000
commit3b6f8b896cf04f26955153df6e46b94aebfaf707 (patch)
tree9dbd244e7b8d3ef56e907676afc9f623fc91e578 /sys/compat
parent1440b0c5298e57d592534c87f2ccff9841c4db42 (diff)
downloadFreeBSD-src-3b6f8b896cf04f26955153df6e46b94aebfaf707.zip
FreeBSD-src-3b6f8b896cf04f26955153df6e46b94aebfaf707.tar.gz
Drop support for historic ioctls and also undefine them, so that code
that checks their presence via ifdef, won't use them. Bump __FreeBSD_version as safety measure.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/svr4/svr4_sockio.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/compat/svr4/svr4_sockio.c b/sys/compat/svr4/svr4_sockio.c
index 053e282..e3d345c 100644
--- a/sys/compat/svr4/svr4_sockio.c
+++ b/sys/compat/svr4/svr4_sockio.c
@@ -144,6 +144,7 @@ svr4_sock_ioctl(fp, td, retval, fd, cmd, data)
case SVR4_SIOCGIFCONF:
{
struct svr4_ifconf sc;
+ struct ifconf *ifc;
if ((error = copyin(data, &sc, sizeof(sc))) != 0)
return error;
@@ -152,9 +153,18 @@ svr4_sock_ioctl(fp, td, retval, fd, cmd, data)
sizeof(struct ifreq), sizeof(struct svr4_ifreq),
sc.svr4_ifc_len));
- if ((error = fo_ioctl(fp, OSIOCGIFCONF,
- (caddr_t) &sc, td->td_ucred,
- td)) != 0)
+ ifc = (struct ifconf *)&sc;
+ ifc->ifc_req.ifr_addr.sa_family =
+ sc.svr4_ifc_req.svr4_ifr_addr.sa_family;
+ ifc->ifc_req.ifr_addr.sa_len = sizeof(struct osockaddr);
+
+ error = fo_ioctl(fp, SIOCGIFCONF, &sc,
+ td->td_ucred, td));
+
+ sc.svr4_ifc_req.svr4_ifr_addr.sa_family =
+ ifc->ifc_req.ifr_addr.sa_family;
+
+ if (error != 0)
return error;
DPRINTF(("SIOCGIFCONF\n"));
OpenPOWER on IntegriCloud