git: bd68debe8124 - stable/15 - libifconfig: Fix table size
Dag-Erling Smørgrav <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src |
|---|---|
| Message-ID | <6a821caf.4639a.158411bb__13764.8914636642$1786911946$gmane$org@gitrepo.freebsd.org> |
The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=bd68debe812400263684e9e9aa85d8bd50956e56 commit bd68debe812400263684e9e9aa85d8bd50956e56 Author: Dag-Erling Smørgrav <[email protected]> AuthorDate: 2026-08-13 21:45:58 +0000 Commit: Dag-Erling Smørgrav <[email protected]> CommitDate: 2026-08-16 20:24:58 +0000 libifconfig: Fix table size Tables that have one element per protocol or address family were previously sized by AF_MAX + 1 since AF_MAX was off by one. Now that AF_MAX has been corrected, we need to apply the opposite correction to these tables. Fixes: ddd850aa7720 ("sys/socket.h: Fix AF_MAX") MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D58827 (cherry picked from commit 79a6ad63e6afdfa00d0e625996bddf91e9f217c3) --- lib/libifconfig/libifconfig_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libifconfig/libifconfig_internal.h b/lib/libifconfig/libifconfig_internal.h index 910e90df7d31..64b474db675b 100644 --- a/lib/libifconfig/libifconfig_internal.h +++ b/lib/libifconfig/libifconfig_internal.h @@ -49,7 +49,7 @@ struct errstate { struct ifconfig_handle { struct errstate error; - int sockets[AF_MAX + 1]; + int sockets[AF_MAX]; /** Cached output of getifaddrs */ struct ifaddrs *ifap; };