aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
-rw-r--r--net/ipv4/xfrm4_policy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 5d51a2af34c1..4ff8ed30024f 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -119,7 +119,7 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
119 119
120 if (xfrm[i]->props.mode == XFRM_MODE_TUNNEL) { 120 if (xfrm[i]->props.mode == XFRM_MODE_TUNNEL) {
121 unsigned short encap_family = xfrm[i]->props.family; 121 unsigned short encap_family = xfrm[i]->props.family;
122 switch(encap_family) { 122 switch (encap_family) {
123 case AF_INET: 123 case AF_INET:
124 fl_tunnel.fl4_dst = xfrm[i]->id.daddr.a4; 124 fl_tunnel.fl4_dst = xfrm[i]->id.daddr.a4;
125 fl_tunnel.fl4_src = xfrm[i]->props.saddr.a4; 125 fl_tunnel.fl4_src = xfrm[i]->props.saddr.a4;
@@ -209,8 +209,8 @@ error:
209static void 209static void
210_decode_session4(struct sk_buff *skb, struct flowi *fl) 210_decode_session4(struct sk_buff *skb, struct flowi *fl)
211{ 211{
212 struct iphdr *iph = skb->nh.iph; 212 struct iphdr *iph = ip_hdr(skb);
213 u8 *xprth = skb->nh.raw + iph->ihl*4; 213 u8 *xprth = skb_network_header(skb) + iph->ihl * 4;
214 214
215 memset(fl, 0, sizeof(struct flowi)); 215 memset(fl, 0, sizeof(struct flowi));
216 if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) { 216 if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) {
@@ -263,7 +263,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl)
263 default: 263 default:
264 fl->fl_ipsec_spi = 0; 264 fl->fl_ipsec_spi = 0;
265 break; 265 break;
266 }; 266 }
267 } 267 }
268 fl->proto = iph->protocol; 268 fl->proto = iph->protocol;
269 fl->fl4_dst = iph->daddr; 269 fl->fl4_dst = iph->daddr;