]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: smaller buffer size without INET6 master
authorRoy Marples <roy@marples.name>
Sat, 6 Jun 2026 07:20:41 +0000 (08:20 +0100)
committerGitHub <noreply@github.com>
Sat, 6 Jun 2026 07:20:41 +0000 (08:20 +0100)
src/privsep.h

index 122b94c5656992c269033fe418e4ec1154834ed9..0959b76febc2f8feaf549df5a03bc816e0e26209 100644 (file)
 #define PS_START 0x4000
 #define PS_STOP         0x8000
 
+#ifdef INET6
+#define PS_BUFLEN6 CMSG_SPACE(sizeof(struct in6_pktinfo) + sizeof(int))
+#else
+#define PS_BUFLEN6 0
+#endif
+
 /* Max INET message size + meta data for IPC */
 #define PS_BUFLEN                                                         \
        ((64 * 1024) + sizeof(struct ps_msghdr) + sizeof(struct msghdr) + \
-           CMSG_SPACE(sizeof(struct in6_pktinfo) + sizeof(int)))
+           PS_BUFLEN6)
 
 #define PSP_NAMESIZE 16 + INET_MAX_ADDRSTRLEN