resolved: tweak cmsg calculation
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.
This commit is contained in:
@@ -88,6 +88,7 @@ static int dns_stream_complete(DnsStream *s, int error) {
|
||||
|
||||
static int dns_stream_identify(DnsStream *s) {
|
||||
CMSG_BUFFER_TYPE(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 = {};
|
||||
struct cmsghdr *cmsg;
|
||||
|
||||
Reference in New Issue
Block a user