aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 21:47:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 21:02:37 -0400
commita94cfd19744a568d97b14bbaa500b2a0c3684f34 (patch)
tree1e933aec3969ba63315d147fa39d0103ce311200
parent26977b4ed728ae911a162b16dbfe1a165b7cf9a1 (diff)
[XFRM]: xfrm_state_lookup() annotations
spi argument of xfrm_state_lookup() is net-endian 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.h2
-rw-r--r--net/ipv4/ipcomp.c2
-rw-r--r--net/ipv6/ipcomp6.c4
-rw-r--r--net/xfrm/xfrm_state.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 80a19748e96a..6da1c7c72b47 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -912,7 +912,7 @@ extern int xfrm_state_check_expire(struct xfrm_state *x);
912extern void xfrm_state_insert(struct xfrm_state *x); 912extern void xfrm_state_insert(struct xfrm_state *x);
913extern int xfrm_state_add(struct xfrm_state *x); 913extern int xfrm_state_add(struct xfrm_state *x);
914extern int xfrm_state_update(struct xfrm_state *x); 914extern int xfrm_state_update(struct xfrm_state *x);
915extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family); 915extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family);
916extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family); 916extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family);
917#ifdef CONFIG_XFRM_SUB_POLICY 917#ifdef CONFIG_XFRM_SUB_POLICY
918extern int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, 918extern int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src,
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index 17342430a843..2017d36024d4 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -183,7 +183,7 @@ out_ok:
183 183
184static void ipcomp4_err(struct sk_buff *skb, u32 info) 184static void ipcomp4_err(struct sk_buff *skb, u32 info)
185{ 185{
186 u32 spi; 186 __be32 spi;
187 struct iphdr *iph = (struct iphdr *)skb->data; 187 struct iphdr *iph = (struct iphdr *)skb->data;
188 struct ip_comp_hdr *ipch = (struct ip_comp_hdr *)(skb->data+(iph->ihl<<2)); 188 struct ip_comp_hdr *ipch = (struct ip_comp_hdr *)(skb->data+(iph->ihl<<2));
189 struct xfrm_state *x; 189 struct xfrm_state *x;
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index ad9c6e824e62..a2860e35efd7 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -178,7 +178,7 @@ out_ok:
178static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, 178static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
179 int type, int code, int offset, __u32 info) 179 int type, int code, int offset, __u32 info)
180{ 180{
181 u32 spi; 181 __be32 spi;
182 struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; 182 struct ipv6hdr *iph = (struct ipv6hdr*)skb->data;
183 struct ipv6_comp_hdr *ipcomph = (struct ipv6_comp_hdr*)(skb->data+offset); 183 struct ipv6_comp_hdr *ipcomph = (struct ipv6_comp_hdr*)(skb->data+offset);
184 struct xfrm_state *x; 184 struct xfrm_state *x;
@@ -234,7 +234,7 @@ static int ipcomp6_tunnel_attach(struct xfrm_state *x)
234{ 234{
235 int err = 0; 235 int err = 0;
236 struct xfrm_state *t = NULL; 236 struct xfrm_state *t = NULL;
237 u32 spi; 237 __be32 spi;
238 238
239 spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&x->props.saddr); 239 spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&x->props.saddr);
240 if (spi) 240 if (spi)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index e40a8862db5d..3692a4783a75 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -421,7 +421,7 @@ xfrm_init_tempsel(struct xfrm_state *x, struct flowi *fl,
421 return 0; 421 return 0;
422} 422}
423 423
424static struct xfrm_state *__xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family) 424static struct xfrm_state *__xfrm_state_lookup(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family)
425{ 425{
426 unsigned int h = xfrm_spi_hash(daddr, spi, proto, family); 426 unsigned int h = xfrm_spi_hash(daddr, spi, proto, family);
427 struct xfrm_state *x; 427 struct xfrm_state *x;
@@ -916,7 +916,7 @@ err:
916EXPORT_SYMBOL(xfrm_state_check); 916EXPORT_SYMBOL(xfrm_state_check);
917 917
918struct xfrm_state * 918struct xfrm_state *
919xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, 919xfrm_state_lookup(xfrm_address_t *daddr, __be32 spi, u8 proto,
920 unsigned short family) 920 unsigned short family)
921{ 921{
922 struct xfrm_state *x; 922 struct xfrm_state *x;