git: 0bad0023b466 - stable/14 - netinet: Deprecate OSIOCAIFADDR and OSIOCAIFADDR_IN6

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 26 Oct 2026 19:47:01 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=0bad0023b466dbd375a905bd956853c81c1a3537

commit 0bad0023b466dbd375a905bd956853c81c1a3537
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-10-05 22:21:39 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-10-26 14:35:02 +0000

    netinet: Deprecate OSIOCAIFADDR and OSIOCAIFADDR_IN6
    
    Requested by:   glebius
    Reviewed by:    pouria, glebius
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D60247
    
    (cherry picked from commit 4bb60157646df86c77cea130c66f63f119947709)
---
 sys/netinet/in.c   | 2 ++
 sys/netinet6/in6.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 857f12a40ce7..24043479e850 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -365,6 +365,8 @@ in_control_ioctl(u_long cmd, void *data, struct ifnet *ifp,
 		sx_xunlock(&in_control_sx);
 		return (error);
 	case OSIOCAIFADDR:	/* 9.x compat */
+		gone_in(17, "%s (pid %d) uses OSIOCAIFADDR");
+		/* FALLTHROUGH */
 	case SIOCAIFADDR:
 		sx_xlock(&in_control_sx);
 		error = in_aifaddr_ioctl(cmd, data, ifp, cred);
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 21a531adc34e..165f9d2dc7eb 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -278,6 +278,7 @@ in6_control_ioctl(u_long cmd, void *data,
 	 * Compat to make pre-10.x ifconfig(8) operable.
 	 */
 	if (cmd == OSIOCAIFADDR_IN6) {
+		gone_in(17, "%s (pid %d) uses OSIOCAIFADDR_IN6");
 		cmd = SIOCAIFADDR_IN6;
 		ifra = &tmpifra;
 		memset(ifra, 0, sizeof(*ifra));