diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-10-07 13:04:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-10-08 12:09:34 +0200 |
commit | 86eb9b4f3837f96dd59abbc39e62979ede489f5a (patch) | |
tree | 019ed7be9d69167e4b9a899c46e3386ccf2be551 /src/resolve | |
parent | resolved: fix fastopen fallback (diff) | |
download | systemd-86eb9b4f3837f96dd59abbc39e62979ede489f5a.tar.xz systemd-86eb9b4f3837f96dd59abbc39e62979ede489f5a.zip |
resolved: use SOCKADDR_LEN() where appropriate
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-dns-stream.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c index c3e825abf4..e57af66221 100644 --- a/src/resolve/resolved-dns-stream.c +++ b/src/resolve/resolved-dns-stream.c @@ -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); |