diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-08 03:20:21 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:21:11 -0500 |
commit | 8c689a6eae2d83970e4f34753d513e96fb97a025 (patch) | |
tree | 50c67089a5a46dbde93fdcb6040227fb599d5110 | |
parent | d2ecd9ccd0694278a8c1fa179d1d058ee66e2297 (diff) |
[XFRM]: misc annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/xfrm.h | 6 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 6 | ||||
-rw-r--r-- | net/ipv6/xfrm6_policy.c | 2 | ||||
-rw-r--r-- | net/ipv6/xfrm6_tunnel.c | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 737fdb2ee8a4..a63e277bacf7 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -951,9 +951,9 @@ extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, | |||
951 | xfrm_address_t *saddr, u8 proto); | 951 | xfrm_address_t *saddr, u8 proto); |
952 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); | 952 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); |
953 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); | 953 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); |
954 | extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); | 954 | extern __be32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); |
955 | extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); | 955 | extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); |
956 | extern u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); | 956 | extern __be32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); |
957 | extern int xfrm6_output(struct sk_buff *skb); | 957 | extern int xfrm6_output(struct sk_buff *skb); |
958 | extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, | 958 | extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, |
959 | u8 **prevhdr); | 959 | u8 **prevhdr); |
@@ -1033,7 +1033,7 @@ static inline int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b, | |||
1033 | switch (family) { | 1033 | switch (family) { |
1034 | default: | 1034 | default: |
1035 | case AF_INET: | 1035 | case AF_INET: |
1036 | return a->a4 - b->a4; | 1036 | return (__force __u32)a->a4 - (__force __u32)b->a4; |
1037 | case AF_INET6: | 1037 | case AF_INET6: |
1038 | return ipv6_addr_cmp((struct in6_addr *)a, | 1038 | return ipv6_addr_cmp((struct in6_addr *)a, |
1039 | (struct in6_addr *)b); | 1039 | (struct in6_addr *)b); |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 1bed0cdf53e3..da766234607b 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -72,8 +72,8 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int | |||
72 | struct dst_entry *dst, *dst_prev; | 72 | struct dst_entry *dst, *dst_prev; |
73 | struct rtable *rt0 = (struct rtable*)(*dst_p); | 73 | struct rtable *rt0 = (struct rtable*)(*dst_p); |
74 | struct rtable *rt = rt0; | 74 | struct rtable *rt = rt0; |
75 | u32 remote = fl->fl4_dst; | 75 | __be32 remote = fl->fl4_dst; |
76 | u32 local = fl->fl4_src; | 76 | __be32 local = fl->fl4_src; |
77 | struct flowi fl_tunnel = { | 77 | struct flowi fl_tunnel = { |
78 | .nl_u = { | 78 | .nl_u = { |
79 | .ip4_u = { | 79 | .ip4_u = { |
@@ -203,7 +203,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl) | |||
203 | case IPPROTO_SCTP: | 203 | case IPPROTO_SCTP: |
204 | case IPPROTO_DCCP: | 204 | case IPPROTO_DCCP: |
205 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { | 205 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { |
206 | u16 *ports = (u16 *)xprth; | 206 | __be16 *ports = (__be16 *)xprth; |
207 | 207 | ||
208 | fl->fl_ip_sport = ports[0]; | 208 | fl->fl_ip_sport = ports[0]; |
209 | fl->fl_ip_dport = ports[1]; | 209 | fl->fl_ip_dport = ports[1]; |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index d400f8fae129..2fba1f0739aa 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -278,7 +278,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl) | |||
278 | case IPPROTO_SCTP: | 278 | case IPPROTO_SCTP: |
279 | case IPPROTO_DCCP: | 279 | case IPPROTO_DCCP: |
280 | if (pskb_may_pull(skb, skb->nh.raw + offset + 4 - skb->data)) { | 280 | if (pskb_may_pull(skb, skb->nh.raw + offset + 4 - skb->data)) { |
281 | u16 *ports = (u16 *)exthdr; | 281 | __be16 *ports = (__be16 *)exthdr; |
282 | 282 | ||
283 | fl->fl_ip_sport = ports[0]; | 283 | fl->fl_ip_sport = ports[0]; |
284 | fl->fl_ip_dport = ports[1]; | 284 | fl->fl_ip_dport = ports[1]; |
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index 7931e4f898d4..f26d81b6342c 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c | |||
@@ -62,7 +62,7 @@ static unsigned inline xfrm6_tunnel_spi_hash_byaddr(xfrm_address_t *addr) | |||
62 | { | 62 | { |
63 | unsigned h; | 63 | unsigned h; |
64 | 64 | ||
65 | h = addr->a6[0] ^ addr->a6[1] ^ addr->a6[2] ^ addr->a6[3]; | 65 | h = (__force u32)(addr->a6[0] ^ addr->a6[1] ^ addr->a6[2] ^ addr->a6[3]); |
66 | h ^= h >> 16; | 66 | h ^= h >> 16; |
67 | h ^= h >> 8; | 67 | h ^= h >> 8; |
68 | h &= XFRM6_TUNNEL_SPI_BYADDR_HSIZE - 1; | 68 | h &= XFRM6_TUNNEL_SPI_BYADDR_HSIZE - 1; |
@@ -126,7 +126,7 @@ static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr) | |||
126 | return NULL; | 126 | return NULL; |
127 | } | 127 | } |
128 | 128 | ||
129 | u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr) | 129 | __be32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr) |
130 | { | 130 | { |
131 | struct xfrm6_tunnel_spi *x6spi; | 131 | struct xfrm6_tunnel_spi *x6spi; |
132 | u32 spi; | 132 | u32 spi; |
@@ -196,7 +196,7 @@ out: | |||
196 | return spi; | 196 | return spi; |
197 | } | 197 | } |
198 | 198 | ||
199 | u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr) | 199 | __be32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr) |
200 | { | 200 | { |
201 | struct xfrm6_tunnel_spi *x6spi; | 201 | struct xfrm6_tunnel_spi *x6spi; |
202 | u32 spi; | 202 | u32 spi; |