diff options
Diffstat (limited to 'net')
-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 |
3 files changed, 7 insertions, 7 deletions
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); |