git: 008e5703e184 - main - netinet6: garbage collect OSIOCGIFINFO_IN6
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 15 Jan 2026 02:57:19 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=008e5703e184cb5fe2079cfbdef5091add2ab3e1
commit 008e5703e184cb5fe2079cfbdef5091add2ab3e1
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-01-08 02:42:02 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-01-15 02:57:10 +0000
netinet6: garbage collect OSIOCGIFINFO_IN6
This ioctl has been marked as "old" starting with the original KAME export
over 20 years ago and has been hidden under #ifdef _KERNEL since. There
is no software that uses it.
---
sys/netinet6/in6.c | 1 -
sys/netinet6/in6_var.h | 3 ---
sys/netinet6/nd6.c | 14 +-------------
sys/netinet6/nd6.h | 17 -----------------
4 files changed, 1 insertion(+), 34 deletions(-)
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index e8b76bdd579b..43452525e992 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -317,7 +317,6 @@ in6_control_ioctl(u_long cmd, void *data,
return (error);
}
/* FALLTHROUGH */
- case OSIOCGIFINFO_IN6:
case SIOCGIFINFO_IN6:
case SIOCGNBRINFO_IN6:
case SIOCGDEFIFACE_IN6:
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index 0cfdde652c0a..8881885ecf86 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -449,9 +449,6 @@ struct in6_rrenumreq {
#define SIOCGIFAFLAG_IN6 _IOWR('i', 73, struct in6_ifreq)
-#ifdef _KERNEL
-#define OSIOCGIFINFO_IN6 _IOWR('i', 76, struct in6_ondireq)
-#endif
#define SIOCGIFINFO_IN6 _IOWR('i', 108, struct in6_ndireq)
#define SIOCSIFINFO_IN6 _IOWR('i', 109, struct in6_ndireq)
#define SIOCSNDFLUSH_IN6 _IOWR('i', 77, struct in6_ifreq)
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 595e0b4ac54f..04ce9bf6dd55 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1649,20 +1649,8 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
/* XXXGL: ??? */
if (ifp->if_inet6 == NULL)
return (EPFNOSUPPORT);
- switch (cmd) {
- case OSIOCGIFINFO_IN6:
#define ND ndi->ndi
- /* XXX: old ndp(8) assumes a positive value for linkmtu. */
- bzero(&ND, sizeof(ND));
- ND.linkmtu = IN6_LINKMTU(ifp);
- ND.maxmtu = ND_IFINFO(ifp)->maxmtu;
- ND.basereachable = ND_IFINFO(ifp)->basereachable;
- ND.reachable = ND_IFINFO(ifp)->reachable;
- ND.retrans = ND_IFINFO(ifp)->retrans;
- ND.flags = ND_IFINFO(ifp)->flags;
- ND.recalctm = ND_IFINFO(ifp)->recalctm;
- ND.chlim = ND_IFINFO(ifp)->chlim;
- break;
+ switch (cmd) {
case SIOCGIFINFO_IN6:
ND = *ND_IFINFO(ifp);
break;
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h
index 3051397ec33f..0f61e167f480 100644
--- a/sys/netinet6/nd6.h
+++ b/sys/netinet6/nd6.h
@@ -139,23 +139,6 @@ struct in6_prefix {
/* struct sockaddr_in6 advrtr[] */
};
-#ifdef _KERNEL
-struct in6_ondireq {
- char ifname[IFNAMSIZ];
- struct {
- u_int32_t linkmtu; /* LinkMTU */
- u_int32_t maxmtu; /* Upper bound of LinkMTU */
- u_int32_t basereachable; /* BaseReachableTime */
- u_int32_t reachable; /* Reachable Time */
- u_int32_t retrans; /* Retrans Timer */
- u_int32_t flags; /* Flags */
- int recalctm; /* BaseReacable re-calculation timer */
- u_int8_t chlim; /* CurHopLimit */
- u_int8_t receivedra;
- } ndi;
-};
-#endif
-
struct in6_ndireq {
char ifname[IFNAMSIZ];
struct nd_ifinfo ndi;