git: 637003d96f69 - stable/15 - netinet: Deprecate OSIOCAIFADDR and OSIOCAIFADDR_IN6

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 22 Oct 2026 17:32:08 UTC
The branch stable/15 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=637003d96f690687c6b5963aa81003bad18ce19a

commit 637003d96f690687c6b5963aa81003bad18ce19a
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-10-05 22:21:39 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-10-22 15:45:41 +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   | 3 +++
 sys/netinet6/in6.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 70a61dbf93a3..acae42df8bfe 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -363,6 +363,9 @@ 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",
+		    curproc->p_comm, curproc->p_pid);
+		/* 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 20a3b4e50a6c..3c6af4c98354 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -276,6 +276,8 @@ 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",
+		    curthread->td_proc->p_comm, curthread->td_proc->p_pid);
 		cmd = SIOCAIFADDR_IN6;
 		ifra = &tmpifra;
 		memset(ifra, 0, sizeof(*ifra));