diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/xfrm4_input.c | 12 | ||||
-rw-r--r-- | net/ipv6/xfrm6_input.c | 12 |
2 files changed, 10 insertions, 14 deletions
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index 33f990d56c91..390dcb1354a5 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c | |||
@@ -51,7 +51,11 @@ int xfrm4_transport_finish(struct sk_buff *skb, int async) | |||
51 | 51 | ||
52 | iph->protocol = XFRM_MODE_SKB_CB(skb)->protocol; | 52 | iph->protocol = XFRM_MODE_SKB_CB(skb)->protocol; |
53 | 53 | ||
54 | #ifdef CONFIG_NETFILTER | 54 | #ifndef CONFIG_NETFILTER |
55 | if (!async) | ||
56 | return -iph->protocol; | ||
57 | #endif | ||
58 | |||
55 | __skb_push(skb, skb->data - skb_network_header(skb)); | 59 | __skb_push(skb, skb->data - skb_network_header(skb)); |
56 | iph->tot_len = htons(skb->len); | 60 | iph->tot_len = htons(skb->len); |
57 | ip_send_check(iph); | 61 | ip_send_check(iph); |
@@ -59,12 +63,6 @@ int xfrm4_transport_finish(struct sk_buff *skb, int async) | |||
59 | NF_HOOK(PF_INET, NF_INET_PRE_ROUTING, skb, skb->dev, NULL, | 63 | NF_HOOK(PF_INET, NF_INET_PRE_ROUTING, skb, skb->dev, NULL, |
60 | xfrm4_rcv_encap_finish); | 64 | xfrm4_rcv_encap_finish); |
61 | return 0; | 65 | return 0; |
62 | #else | ||
63 | if (async) | ||
64 | return xfrm4_rcv_encap_finish(skb); | ||
65 | |||
66 | return -iph->protocol; | ||
67 | #endif | ||
68 | } | 66 | } |
69 | 67 | ||
70 | /* If it's a keepalive packet, then just eat it. | 68 | /* If it's a keepalive packet, then just eat it. |
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) | |||
34 | skb_network_header(skb)[IP6CB(skb)->nhoff] = | 34 | skb_network_header(skb)[IP6CB(skb)->nhoff] = |
35 | XFRM_MODE_SKB_CB(skb)->protocol; | 35 | XFRM_MODE_SKB_CB(skb)->protocol; |
36 | 36 | ||
37 | #ifdef CONFIG_NETFILTER | 37 | #ifndef CONFIG_NETFILTER |
38 | if (!async) | ||
39 | return 1; | ||
40 | #endif | ||
41 | |||
38 | ipv6_hdr(skb)->payload_len = htons(skb->len); | 42 | ipv6_hdr(skb)->payload_len = htons(skb->len); |
39 | __skb_push(skb, skb->data - skb_network_header(skb)); | 43 | __skb_push(skb, skb->data - skb_network_header(skb)); |
40 | 44 | ||
41 | NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, skb->dev, NULL, | 45 | NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, skb->dev, NULL, |
42 | ip6_rcv_finish); | 46 | ip6_rcv_finish); |
43 | return -1; | 47 | return -1; |
44 | #else | ||
45 | if (async) | ||
46 | return ip6_rcv_finish(skb); | ||
47 | |||
48 | return 1; | ||
49 | #endif | ||
50 | } | 48 | } |
51 | 49 | ||
52 | int xfrm6_rcv(struct sk_buff *skb) | 50 | int xfrm6_rcv(struct sk_buff *skb) |