diff options
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
| -rw-r--r-- | net/ipv4/xfrm4_policy.c | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 9a459be24af..6156f68a1e9 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -104,9 +104,14 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)  	const struct iphdr *iph = ip_hdr(skb);  	u8 *xprth = skb_network_header(skb) + iph->ihl * 4;  	struct flowi4 *fl4 = &fl->u.ip4; +	int oif = 0; + +	if (skb_dst(skb)) +		oif = skb_dst(skb)->dev->ifindex;  	memset(fl4, 0, sizeof(struct flowi4));  	fl4->flowi4_mark = skb->mark; +	fl4->flowi4_oif = reverse ? skb->skb_iif : oif;  	if (!ip_is_fragment(iph)) {  		switch (iph->protocol) { @@ -235,7 +240,7 @@ static struct dst_ops xfrm4_dst_ops = {  	.destroy =		xfrm4_dst_destroy,  	.ifdown =		xfrm4_dst_ifdown,  	.local_out =		__ip_local_out, -	.gc_thresh =		1024, +	.gc_thresh =		32768,  };  static struct xfrm_policy_afinfo xfrm4_policy_afinfo = { @@ -320,6 +325,7 @@ void __init xfrm4_init(void)  	xfrm4_state_init();  	xfrm4_policy_init(); +	xfrm4_protocol_init();  #ifdef CONFIG_SYSCTL  	register_pernet_subsys(&xfrm4_net_ops);  #endif  | 
