diff options
author | Hans Schillstrom <hans@schillstrom.com> | 2012-05-17 18:35:46 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-06-07 08:53:01 -0400 |
commit | d1992b169d31f339dc5ea4e9f312567c8cf322a3 (patch) | |
tree | 200649e617e0c1a548e9404989e17ed8a58c6e4b /include/linux | |
parent | da2e852612967a53d17de930929574444a67fb52 (diff) |
netfilter: xt_HMARK: fix endianness and provide consistent hashing
This patch addresses two issues:
a) Fix usage of u32 and __be32 that causes endianess warnings via sparse.
b) Ensure consistent hashing in a cluster that is composed of big and
little endian systems. Thus, we obtain the same hash mark in an
heterogeneous cluster.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netfilter/xt_HMARK.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netfilter/xt_HMARK.h b/include/linux/netfilter/xt_HMARK.h index abb1650940d2..826fc5807577 100644 --- a/include/linux/netfilter/xt_HMARK.h +++ b/include/linux/netfilter/xt_HMARK.h | |||
@@ -27,7 +27,12 @@ union hmark_ports { | |||
27 | __u16 src; | 27 | __u16 src; |
28 | __u16 dst; | 28 | __u16 dst; |
29 | } p16; | 29 | } p16; |
30 | struct { | ||
31 | __be16 src; | ||
32 | __be16 dst; | ||
33 | } b16; | ||
30 | __u32 v32; | 34 | __u32 v32; |
35 | __be32 b32; | ||
31 | }; | 36 | }; |
32 | 37 | ||
33 | struct xt_hmark_info { | 38 | struct xt_hmark_info { |