From e31823d42a9591021bf5bbe818b530133eb437da Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 20 Feb 2009 19:51:22 +0100 Subject: 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 --- include/network.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/network.h') 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; -- cgit v1.2.3