diff options
author | Patrick McHardy <kaber@trash.net> | 2006-12-03 01:05:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-03 01:05:08 -0500 |
commit | bff9a89bcac5b68ac0a1ea856b1726a35ae1eabb (patch) | |
tree | 188356d5411849c8d7b1a36dcb3223373a0bbb68 /net/ipv6 | |
parent | f9aae95828d3478520f4bd73221bcb450ec1a5c0 (diff) |
[NETFILTER]: nf_conntrack: endian annotations
Resync with Al Viro's ip_conntrack annotations and fix a missed
spot in ip_nat_proto_icmp.c.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index 1e8e700f6135..3905cacc69af 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -287,7 +287,7 @@ static int icmpv6_nfattr_to_tuple(struct nfattr *tb[], | |||
287 | tuple->dst.u.icmp.code = | 287 | tuple->dst.u.icmp.code = |
288 | *(u_int8_t *)NFA_DATA(tb[CTA_PROTO_ICMPV6_CODE-1]); | 288 | *(u_int8_t *)NFA_DATA(tb[CTA_PROTO_ICMPV6_CODE-1]); |
289 | tuple->src.u.icmp.id = | 289 | tuple->src.u.icmp.id = |
290 | *(u_int16_t *)NFA_DATA(tb[CTA_PROTO_ICMPV6_ID-1]); | 290 | *(__be16 *)NFA_DATA(tb[CTA_PROTO_ICMPV6_ID-1]); |
291 | 291 | ||
292 | if (tuple->dst.u.icmp.type < 128 | 292 | if (tuple->dst.u.icmp.type < 128 |
293 | || tuple->dst.u.icmp.type - 128 >= sizeof(invmap) | 293 | || tuple->dst.u.icmp.type - 128 >= sizeof(invmap) |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index bf93c1ea6be9..37e5fca923aa 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -72,7 +72,7 @@ struct nf_ct_frag6_queue | |||
72 | struct hlist_node list; | 72 | struct hlist_node list; |
73 | struct list_head lru_list; /* lru list member */ | 73 | struct list_head lru_list; /* lru list member */ |
74 | 74 | ||
75 | __u32 id; /* fragment id */ | 75 | __be32 id; /* fragment id */ |
76 | struct in6_addr saddr; | 76 | struct in6_addr saddr; |
77 | struct in6_addr daddr; | 77 | struct in6_addr daddr; |
78 | 78 | ||
@@ -115,28 +115,28 @@ static __inline__ void fq_unlink(struct nf_ct_frag6_queue *fq) | |||
115 | write_unlock(&nf_ct_frag6_lock); | 115 | write_unlock(&nf_ct_frag6_lock); |
116 | } | 116 | } |
117 | 117 | ||
118 | static unsigned int ip6qhashfn(u32 id, struct in6_addr *saddr, | 118 | static unsigned int ip6qhashfn(__be32 id, struct in6_addr *saddr, |
119 | struct in6_addr *daddr) | 119 | struct in6_addr *daddr) |
120 | { | 120 | { |
121 | u32 a, b, c; | 121 | u32 a, b, c; |
122 | 122 | ||
123 | a = saddr->s6_addr32[0]; | 123 | a = (__force u32)saddr->s6_addr32[0]; |
124 | b = saddr->s6_addr32[1]; | 124 | b = (__force u32)saddr->s6_addr32[1]; |
125 | c = saddr->s6_addr32[2]; | 125 | c = (__force u32)saddr->s6_addr32[2]; |
126 | 126 | ||
127 | a += JHASH_GOLDEN_RATIO; | 127 | a += JHASH_GOLDEN_RATIO; |
128 | b += JHASH_GOLDEN_RATIO; | 128 | b += JHASH_GOLDEN_RATIO; |
129 | c += nf_ct_frag6_hash_rnd; | 129 | c += nf_ct_frag6_hash_rnd; |
130 | __jhash_mix(a, b, c); | 130 | __jhash_mix(a, b, c); |
131 | 131 | ||
132 | a += saddr->s6_addr32[3]; | 132 | a += (__force u32)saddr->s6_addr32[3]; |
133 | b += daddr->s6_addr32[0]; | 133 | b += (__force u32)daddr->s6_addr32[0]; |
134 | c += daddr->s6_addr32[1]; | 134 | c += (__force u32)daddr->s6_addr32[1]; |
135 | __jhash_mix(a, b, c); | 135 | __jhash_mix(a, b, c); |
136 | 136 | ||
137 | a += daddr->s6_addr32[2]; | 137 | a += (__force u32)daddr->s6_addr32[2]; |
138 | b += daddr->s6_addr32[3]; | 138 | b += (__force u32)daddr->s6_addr32[3]; |
139 | c += id; | 139 | c += (__force u32)id; |
140 | __jhash_mix(a, b, c); | 140 | __jhash_mix(a, b, c); |
141 | 141 | ||
142 | return c & (FRAG6Q_HASHSZ - 1); | 142 | return c & (FRAG6Q_HASHSZ - 1); |
@@ -338,7 +338,7 @@ static struct nf_ct_frag6_queue *nf_ct_frag6_intern(unsigned int hash, | |||
338 | 338 | ||
339 | 339 | ||
340 | static struct nf_ct_frag6_queue * | 340 | static struct nf_ct_frag6_queue * |
341 | nf_ct_frag6_create(unsigned int hash, u32 id, struct in6_addr *src, struct in6_addr *dst) | 341 | nf_ct_frag6_create(unsigned int hash, __be32 id, struct in6_addr *src, struct in6_addr *dst) |
342 | { | 342 | { |
343 | struct nf_ct_frag6_queue *fq; | 343 | struct nf_ct_frag6_queue *fq; |
344 | 344 | ||
@@ -366,7 +366,7 @@ oom: | |||
366 | } | 366 | } |
367 | 367 | ||
368 | static __inline__ struct nf_ct_frag6_queue * | 368 | static __inline__ struct nf_ct_frag6_queue * |
369 | fq_find(u32 id, struct in6_addr *src, struct in6_addr *dst) | 369 | fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst) |
370 | { | 370 | { |
371 | struct nf_ct_frag6_queue *fq; | 371 | struct nf_ct_frag6_queue *fq; |
372 | struct hlist_node *n; | 372 | struct hlist_node *n; |