diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-08-13 21:45:58 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-08-14 00:54:27 +0000 |
| commit | 79a6ad63e6afdfa00d0e625996bddf91e9f217c3 (patch) | |
| tree | 58dce4b6222fdebbf23b7884e7b78d20e7c1b471 | |
| parent | 6c41d928bcd763ec60d55bec2886c05b03cf9e6a (diff) | |
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
| -rw-r--r-- | lib/libifconfig/libifconfig_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; }; |
