]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[XFRM]: fl_ipsec_spi is net-endian
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 28 Sep 2006 01:49:07 +0000 (18:49 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 29 Sep 2006 01:02:43 +0000 (18:02 -0700)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/flow.h
net/ipv4/xfrm4_policy.c

index 5700b0ad63c04a63ad701e5cc7ea69985b6b6605..ddf5f3ca1720154be67aca197f628f1e7a83fd08 100644 (file)
@@ -73,7 +73,7 @@ struct flowi {
                        __u8    objname[16]; /* Not zero terminated */
                } dnports;
 
-               __u32           spi;
+               __be32          spi;
 
 #ifdef CONFIG_IPV6_MIP6
                struct {
index eabcd27b176730d83e42ce599e28c7a7e3407e0f..7a7a00147e55c7d63758d2d3bad84884d3b1a4c6 100644 (file)
@@ -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]));
                        }