aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/xfrm6_input.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-30 21:10:14 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:00:10 -0800
commit0883ae0e5599656b5f3b0e9ce474e01dee7dfee4 (patch)
treece21b9b78418aca9caf5cbc709de523c953a2db2 /net/ipv6/xfrm6_input.c
parent[IPSEC]: Fix double free on skb on async output (diff)
downloadlinux-dev-0883ae0e5599656b5f3b0e9ce474e01dee7dfee4.tar.xz
linux-dev-0883ae0e5599656b5f3b0e9ce474e01dee7dfee4.zip
[IPSEC]: Fix transport-mode async resume on intput without netfilter
When netfilter is off the transport-mode async resumption doesn't work because we don't push back the IP header. This patch fixes that by moving most of the code outside of ifdef NETFILTER since the only part that's not common is the short-circuit in the protocol handler. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/xfrm6_input.c')
-rw-r--r--net/ipv6/xfrm6_input.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c
index 063ce6ed1bd0..a4714d76ae6b 100644
--- a/net/ipv6/xfrm6_input.c
+++ b/net/ipv6/xfrm6_input.c
@@ -34,19 +34,17 @@ int xfrm6_transport_finish(struct sk_buff *skb, int async)
skb_network_header(skb)[IP6CB(skb)->nhoff] =
XFRM_MODE_SKB_CB(skb)->protocol;
-#ifdef CONFIG_NETFILTER
+#ifndef CONFIG_NETFILTER
+ if (!async)
+ return 1;
+#endif
+
ipv6_hdr(skb)->payload_len = htons(skb->len);
__skb_push(skb, skb->data - skb_network_header(skb));
NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, skb->dev, NULL,
ip6_rcv_finish);
return -1;
-#else
- if (async)
- return ip6_rcv_finish(skb);
-
- return 1;
-#endif
}
int xfrm6_rcv(struct sk_buff *skb)