diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-05-27 19:38:38 +0200 |
---|---|---|
committer | The Plumber <50238977+systemd-rhel-bot@users.noreply.github.com> | 2020-11-24 19:05:45 +0100 |
commit | 6ece87bef14ac5741fc870644504737b00607546 (patch) | |
tree | f1b1c5045447961ae36f52854aed0d2e3b728d81 | |
parent | 905a97ce65352d80af7260d34b74fd8342792c35 (diff) |
resolved: tweak cmsg calculationv239-43
We ask for the TTL, then have enough space for it.
We probably can drop the extra cmsg space now, but let's figure that out
another time, since the extra cmsg space is used elsewhere in resolved
as well.
(cherry picked from commit 08ab18618ec59022582f1513c0718ba369f5ba85)
Related: #1887181
-rw-r--r-- | src/resolve/resolved-dns-stream.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c index 066daef96e..555e200a23 100644 --- a/src/resolve/resolved-dns-stream.c +++ b/src/resolve/resolved-dns-stream.c @@ -70,6 +70,7 @@ static int dns_stream_identify(DnsStream *s) { union { struct cmsghdr header; /* For alignment */ uint8_t buffer[CMSG_SPACE(MAXSIZE(struct in_pktinfo, struct in6_pktinfo)) + + CMSG_SPACE(int) + /* for the TTL */ + EXTRA_CMSG_SPACE /* kernel appears to require extra space */]; } control; struct msghdr mh = {}; |