diff --git a/src/app-layer-dns-common.h b/src/app-layer-dns-common.h index 9ae04c165d..ab2d8ef118 100644 --- a/src/app-layer-dns-common.h +++ b/src/app-layer-dns-common.h @@ -78,12 +78,12 @@ typedef struct DNSHeader_ { uint16_t answer_rr; uint16_t authority_rr; uint16_t additional_rr; -} DNSHeader; +} __attribute__((__packed__)) DNSHeader; typedef struct DNSQueryTrailer_ { uint16_t type; uint16_t class; -} DNSQueryTrailer; +} __attribute__((__packed__)) DNSQueryTrailer; /** \brief DNS answer header * packed as we don't want alignment to mess up sizeof() */ diff --git a/src/decode-tcp.h b/src/decode-tcp.h index 067d4a4862..152d5103f4 100644 --- a/src/decode-tcp.h +++ b/src/decode-tcp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2010 Open Information Security Foundation +/* Copyright (C) 2007-2013 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -136,7 +136,7 @@ typedef struct TCPHdr_ uint16_t th_win; /**< pkt window */ uint16_t th_sum; /**< checksum */ uint16_t th_urp; /**< urgent pointer */ -} TCPHdr; +} __attribute__((__packed__)) TCPHdr; typedef struct TCPVars_ { diff --git a/src/decode-udp.h b/src/decode-udp.h index 2c3a7845d7..5636c32b0f 100644 --- a/src/decode-udp.h +++ b/src/decode-udp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2010 Open Information Security Foundation +/* Copyright (C) 2007-2013 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -42,7 +42,7 @@ typedef struct UDPHdr_ uint16_t uh_dport; /* destination port */ uint16_t uh_len; /* length */ uint16_t uh_sum; /* checksum */ -} UDPHdr; +} __attribute__((__packed__)) UDPHdr; typedef struct UDPVars_ {