[conntrack-tools] network: fix endianess issue in acknowledgment network header
Pablo Neira
netfilter-cvslog-bounces at lists.netfilter.org
Fri Feb 20 20:07:01 CET 2009
Gitweb: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=1c8002a2de8cfc2ff9d624099d5154bcd77e2f37
commit 1c8002a2de8cfc2ff9d624099d5154bcd77e2f37
Author: Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Fri Feb 20 20:06:22 2009 +0100
Commit: Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Fri Feb 20 20:06:22 2009 +0100
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 at netfilter.org>
via 1c8002a2de8cfc2ff9d624099d5154bcd77e2f37 (commit)
from e31823d42a9591021bf5bbe818b530133eb437da (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1c8002a2de8cfc2ff9d624099d5154bcd77e2f37
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date: Fri Feb 20 20:06:22 2009 +0100
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 at netfilter.org>
-----------------------------------------------------------------------
include/network.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
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 at netfilter.org>
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;
More information about the netfilter-cvslog
mailing list