Commit 4324a174 authored by Al Viro's avatar Al Viro Committed by David S. Miller

[XFRM]: fl_ipsec_spi is net-endian

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9916ecb0
......@@ -73,7 +73,7 @@ struct flowi {
__u8 objname[16]; /* Not zero terminated */
} dnports;
__u32 spi;
__be32 spi;
#ifdef CONFIG_IPV6_MIP6
struct {
......
......@@ -221,7 +221,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl)
case IPPROTO_ESP:
if (pskb_may_pull(skb, xprth + 4 - skb->data)) {
u32 *ehdr = (u32 *)xprth;
__be32 *ehdr = (__be32 *)xprth;
fl->fl_ipsec_spi = ehdr[0];
}
......@@ -229,7 +229,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl)
case IPPROTO_AH:
if (pskb_may_pull(skb, xprth + 8 - skb->data)) {
u32 *ah_hdr = (u32*)xprth;
__be32 *ah_hdr = (__be32*)xprth;
fl->fl_ipsec_spi = ah_hdr[1];
}
......@@ -237,7 +237,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl)
case IPPROTO_COMP:
if (pskb_may_pull(skb, xprth + 4 - skb->data)) {
u16 *ipcomp_hdr = (u16 *)xprth;
__be16 *ipcomp_hdr = (__be16 *)xprth;
fl->fl_ipsec_spi = htonl(ntohs(ipcomp_hdr[1]));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment