diff options
-rw-r--r-- | include/net/xfrm.h | 2 | ||||
-rw-r--r-- | net/ipv4/xfrm4_input.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_input.c | 2 | ||||
-rw-r--r-- | net/xfrm/xfrm_input.c | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 6da1c7c72b47..460551968560 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1004,7 +1004,7 @@ extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pi | |||
1004 | extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); | 1004 | extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); |
1005 | 1005 | ||
1006 | extern void xfrm_input_init(void); | 1006 | extern void xfrm_input_init(void); |
1007 | extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq); | 1007 | extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq); |
1008 | 1008 | ||
1009 | extern void xfrm_probe_algs(void); | 1009 | extern void xfrm_probe_algs(void); |
1010 | extern int xfrm_count_auth_supported(void); | 1010 | extern int xfrm_count_auth_supported(void); |
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index 040e8475f295..8655d038364c 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c | |||
@@ -23,7 +23,7 @@ int xfrm4_rcv(struct sk_buff *skb) | |||
23 | 23 | ||
24 | EXPORT_SYMBOL(xfrm4_rcv); | 24 | EXPORT_SYMBOL(xfrm4_rcv); |
25 | 25 | ||
26 | static int xfrm4_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq) | 26 | static int xfrm4_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq) |
27 | { | 27 | { |
28 | switch (nexthdr) { | 28 | switch (nexthdr) { |
29 | case IPPROTO_IPIP: | 29 | case IPPROTO_IPIP: |
@@ -55,7 +55,7 @@ drop: | |||
55 | int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) | 55 | int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) |
56 | { | 56 | { |
57 | int err; | 57 | int err; |
58 | u32 spi, seq; | 58 | __be32 spi, seq; |
59 | struct xfrm_state *xfrm_vec[XFRM_MAX_DEPTH]; | 59 | struct xfrm_state *xfrm_vec[XFRM_MAX_DEPTH]; |
60 | struct xfrm_state *x; | 60 | struct xfrm_state *x; |
61 | int xfrm_nr = 0; | 61 | int xfrm_nr = 0; |
diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c index a40a05789013..140aa8769acc 100644 --- a/net/ipv6/xfrm6_input.c +++ b/net/ipv6/xfrm6_input.c | |||
@@ -19,7 +19,7 @@ | |||
19 | int xfrm6_rcv_spi(struct sk_buff *skb, u32 spi) | 19 | int xfrm6_rcv_spi(struct sk_buff *skb, u32 spi) |
20 | { | 20 | { |
21 | int err; | 21 | int err; |
22 | u32 seq; | 22 | __be32 seq; |
23 | struct xfrm_state *xfrm_vec[XFRM_MAX_DEPTH]; | 23 | struct xfrm_state *xfrm_vec[XFRM_MAX_DEPTH]; |
24 | struct xfrm_state *x; | 24 | struct xfrm_state *x; |
25 | int xfrm_nr = 0; | 25 | int xfrm_nr = 0; |
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index dfc90bb1cf1f..e8198a2c785d 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c | |||
@@ -46,7 +46,7 @@ EXPORT_SYMBOL(secpath_dup); | |||
46 | 46 | ||
47 | /* Fetch spi and seq from ipsec header */ | 47 | /* Fetch spi and seq from ipsec header */ |
48 | 48 | ||
49 | int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq) | 49 | int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq) |
50 | { | 50 | { |
51 | int offset, offset_seq; | 51 | int offset, offset_seq; |
52 | 52 | ||
@@ -62,7 +62,7 @@ int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq) | |||
62 | case IPPROTO_COMP: | 62 | case IPPROTO_COMP: |
63 | if (!pskb_may_pull(skb, sizeof(struct ip_comp_hdr))) | 63 | if (!pskb_may_pull(skb, sizeof(struct ip_comp_hdr))) |
64 | return -EINVAL; | 64 | return -EINVAL; |
65 | *spi = htonl(ntohs(*(u16*)(skb->h.raw + 2))); | 65 | *spi = htonl(ntohs(*(__be16*)(skb->h.raw + 2))); |
66 | *seq = 0; | 66 | *seq = 0; |
67 | return 0; | 67 | return 0; |
68 | default: | 68 | default: |
@@ -72,8 +72,8 @@ int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq) | |||
72 | if (!pskb_may_pull(skb, 16)) | 72 | if (!pskb_may_pull(skb, 16)) |
73 | return -EINVAL; | 73 | return -EINVAL; |
74 | 74 | ||
75 | *spi = *(u32*)(skb->h.raw + offset); | 75 | *spi = *(__be32*)(skb->h.raw + offset); |
76 | *seq = *(u32*)(skb->h.raw + offset_seq); | 76 | *seq = *(__be32*)(skb->h.raw + offset_seq); |
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
79 | EXPORT_SYMBOL(xfrm_parse_spi); | 79 | EXPORT_SYMBOL(xfrm_parse_spi); |