From 9c491563837983385bf9fa244590e76e142f4fa3 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Wed, 9 Dec 2015 12:01:08 +0100 Subject: resolved: add support for linked packets For mDNS, we need to support the TC bit in case the list of known answers exceed the maximum packet size. For this, add a 'more' pointer to DnsPacket for an additional packet. When a packet is unref'ed, the ->more packet is also unrefed, so it sufficient to only keep track of the 1st packet in a chain. --- src/resolve/resolved-dns-packet.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/resolve/resolved-dns-packet.h') diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h index 405838e60d..3d84cb622b 100644 --- a/src/resolve/resolved-dns-packet.h +++ b/src/resolve/resolved-dns-packet.h @@ -88,6 +88,9 @@ struct DnsPacket { uint16_t sender_port, destination_port; uint32_t ttl; + /* For support of truncated packets */ + DnsPacket *more; + bool on_stack:1; bool extracted:1; bool refuse_compression:1; -- cgit v1.2.3-54-g00ecf