dns: explicitly endian-convert all fields in header and question
[project/mdnsd.git] / dns.h
diff --git a/dns.h b/dns.h
index f1f021203697a56689e9553e6684c8757ac0edba..91570bd6c703762f5cccb7e08144571a1111d068 100644 (file)
--- a/dns.h
+++ b/dns.h
@@ -49,7 +49,7 @@ struct dns_header {
        uint16_t answers;
        uint16_t authority;
        uint16_t additional;
-};
+} __attribute__((packed));
 
 struct dns_srv_data {
        uint16_t priority;