summaryrefslogtreecommitdiff
path: root/include/network.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-02-20 19:51:22 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-02-20 19:51:22 +0100
commite31823d42a9591021bf5bbe818b530133eb437da (patch)
tree4e7e28d19bb8f682180b4b57271289e76c6b6975 /include/network.h
parent9d67451ca43b0a469f16d0d139e014b9a5fee33d (diff)
downloadconntrack-tools-e31823d42a9591021bf5bbe818b530133eb437da.tar.gz
conntrack-tools-e31823d42a9591021bf5bbe818b530133eb437da.zip
network: fix endianess issue in synchronization network header
This patch fixes an endianess issue in the synchronization network header. This breaks backward compatibility if different conntrackd versions are used. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/network.h')
-rw-r--r--include/network.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/network.h b/include/network.h
index 7cfaf84..3cf2cad 100644
--- a/include/network.h
+++ b/include/network.h
@@ -9,8 +9,15 @@
struct nf_conntrack;
struct nethdr {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ uint8_t type:4,
+ version:4;
+#elif __BYTE_ORDER == __BIG_ENDIAN
uint8_t version:4,
type:4;
+#else
+#error "Unknown system endianess!"
+#endif
uint8_t flags;
uint16_t len;
uint32_t seq;