]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: use SOCKADDR_LEN() where appropriate 34665/head
authorLennart Poettering <lennart@poettering.net>
Mon, 7 Oct 2024 11:04:29 +0000 (13:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 8 Oct 2024 10:09:34 +0000 (12:09 +0200)
src/resolve/resolved-dns-stream.c

index c3e825abf431fcbcafa39370b63e982812f357a2..e57af6622180ad5e5f55968cc173ea75be3d2ecf 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <linux/if_arp.h>
 #include <netinet/tcp.h>
 #include <unistd.h>
 
@@ -568,7 +569,7 @@ int dns_stream_new(
 
         if (tfo_address) {
                 s->tfo_address = *tfo_address;
-                s->tfo_salen = tfo_address->sa.sa_family == AF_INET6 ? sizeof(tfo_address->in6) : sizeof(tfo_address->in);
+                s->tfo_salen = SOCKADDR_LEN(*tfo_address);
         }
 
         *ret = TAKE_PTR(s);