summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-packet.h
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-07-14 13:26:16 -0400
committerDaniel Mack <github@zonque.org>2015-07-14 13:26:16 -0400
commitc0d645b51f6a65a03cce4e29ed276ccdcb5b6ab0 (patch)
treefb5f6d2154cb7d2a021a57721f5f92962cd24361 /src/resolve/resolved-dns-packet.h
parentca970016b7e5176e94eee3af24a70d5b3355018f (diff)
parentd20b1667dbab8bccf69735523a0d5fc645e81b80 (diff)
Merge pull request #585 from teg/resolved-harden-2
resolved: harden
Diffstat (limited to 'src/resolve/resolved-dns-packet.h')
-rw-r--r--src/resolve/resolved-dns-packet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
index bf998aa84e..6588ed9df5 100644
--- a/src/resolve/resolved-dns-packet.h
+++ b/src/resolve/resolved-dns-packet.h
@@ -21,6 +21,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <netinet/udp.h>
+#include <netinet/ip.h>
#include "macro.h"
#include "sparse-endian.h"
@@ -53,6 +55,7 @@ struct DnsPacketHeader {
};
#define DNS_PACKET_HEADER_SIZE sizeof(DnsPacketHeader)
+#define UDP_PACKET_HEADER_SIZE (sizeof(struct iphdr) + sizeof(struct udphdr))
/* The various DNS protocols deviate in how large a packet can grow,
but the TCP transport has a 16bit size field, hence that appears to