diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-02-20 20:06:22 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-02-20 20:06:22 +0100 |
commit | 1c8002a2de8cfc2ff9d624099d5154bcd77e2f37 (patch) | |
tree | 51c01a420ee03cf8b4fc8a28a7bb0715a3b11e95 /include | |
parent | e31823d42a9591021bf5bbe818b530133eb437da (diff) | |
download | conntrack-tools-1c8002a2de8cfc2ff9d624099d5154bcd77e2f37.tar.gz conntrack-tools-1c8002a2de8cfc2ff9d624099d5154bcd77e2f37.zip |
network: fix endianess issue in acknowledgment network header
This patch fixes an endianess issue in the acknowledgment 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')
-rw-r--r-- | include/network.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/network.h b/include/network.h index 3cf2cad..29a6113 100644 --- a/include/network.h +++ b/include/network.h @@ -45,8 +45,15 @@ int object_status_to_network_type(int status); (struct netattr *)(((char *)x) + x->len) struct nethdr_ack { +#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; |