From: Sascha Wildner Date: Wed, 20 Jun 2018 17:13:48 +0000 (+0200) Subject: kernel: Remove some old 4.3BSD era ioctls. X-Git-Tag: v5.5.0~485 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/e7ab884bd49753f8884eb597d10d6569a08fa0df kernel: Remove some old 4.3BSD era ioctls. Not all of them were implemented even. Bump __DragonFly_version, just in case. Thanks to zrj for testing with a dports bulk. --- diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c index 9f220836fa..78c1dfecc1 100644 --- a/libexec/rbootd/bpf.c +++ b/libexec/rbootd/bpf.c @@ -228,19 +228,11 @@ BpfGetIntfName(char **errmsg) ifc.ifc_len = sizeof ibuf; ifc.ifc_buf = (caddr_t)ibuf; -#ifdef OSIOCGIFCONF - if (ioctl(fd, OSIOCGIFCONF, (char *)&ifc) < 0 || - ifc.ifc_len < sizeof(struct ifreq)) { - (void) strcpy(errbuf, "bpf: ioctl(OSIOCGIFCONF): %m"); - return(NULL); - } -#else if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 || ifc.ifc_len < sizeof(struct ifreq)) { (void) strcpy(errbuf, "bpf: ioctl(SIOCGIFCONF): %m"); return(NULL); } -#endif ifrp = ibuf; ifend = (struct ifreq *)((char *)ibuf + ifc.ifc_len); diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 5a27c3cb4a..3cdc29527f 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD: src/share/man/man9/ifnet.9,v 1.9.2.10 2003/06/15 02:22:30 hmp Exp $ .\" -.Dd July 19, 2016 +.Dd June 20, 2018 .Dt IFNET 9 .Os .Sh NAME @@ -838,9 +838,8 @@ further interpretation. The following commands are handled by .Fn ifioctl : .Pp -.Bl -tag -width ".Dv OSIOCGIFNETMASK" -offset indent -compact +.Bl -tag -width ".Dv SIOCSIFDSTADDR" -offset indent -compact .It Dv SIOCGIFCONF -.It Dv OSIOCGIFCONF Get interface configuration. (No call-down to driver.) .Pp @@ -900,18 +899,6 @@ function is called to perform the operation; qq.v. .It Dv SIOCSIFNETMASK The socket's protocol control routine is called to implement the requested action. -.Pp -.It Dv OSIOCGIFADDR -.It Dv OSIOCGIFDSTADDR -.It Dv OSIOCGIFBRDADDR -.It Dv OSIOCGIFNETMASK -The socket's protocol control routine is called to implement the -requested action. -On return, -.Vt sockaddr -structures are converted into old-style (no -.Va sa_len -member). .El .El .Pp diff --git a/sys/net/if.c b/sys/net/if.c index 1d944f2654..6869092dcf 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1826,7 +1826,6 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct ucred *cred) switch (cmd) { case SIOCGIFCONF: - case OSIOCGIFCONF: return (ifconf(cmd, data, cred)); default: break; diff --git a/sys/net/tap/if_tap.c b/sys/net/tap/if_tap.c index 5fb75258cc..00ce4e7d95 100644 --- a/sys/net/tap/if_tap.c +++ b/sys/net/tap/if_tap.c @@ -797,8 +797,7 @@ tapioctl(struct dev_ioctl_args *ap) ifp->if_flags = f | (ifp->if_flags & IFF_CANTCHANGE); break; - case OSIOCGIFADDR: /* get MAC address of the remote side */ - case SIOCGIFADDR: + case SIOCGIFADDR: /* get MAC address of the remote side */ bcopy(tp->ether_addr, data, sizeof(tp->ether_addr)); break; diff --git a/sys/sys/param.h b/sys/sys/param.h index a24d2bd2f6..3f1c0a2653 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -179,9 +179,10 @@ * 500306 - strsuftoll(), strsuftollx() * 500307 - tcsetsid() * 500308 - xdr_uint16_t() + * 500309 - drop support for some ancient ioctls (OSIOCGIF*) */ #undef __DragonFly_version -#define __DragonFly_version 500308 /* propagated to newvers */ +#define __DragonFly_version 500309 /* propagated to newvers */ #include diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h index f3429500c2..ddb31086ad 100644 --- a/sys/sys/sockio.h +++ b/sys/sys/sockio.h @@ -28,7 +28,6 @@ * * @(#)sockio.h 8.1 (Berkeley) 3/28/94 * $FreeBSD: src/sys/sys/sockio.h,v 1.14.2.6 2002/02/07 15:12:37 ambrisko Exp $ - * $DragonFly: src/sys/sys/sockio.h,v 1.5 2007/09/30 04:37:27 sephe Exp $ */ #ifndef _SYS_SOCKIO_H_ @@ -49,19 +48,14 @@ #define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */ #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ -#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */ #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ -#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */ #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */ #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ -#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */ #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */ -#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */ #define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */ -#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */ #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */ #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */