aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/xfrm4_input.c')
-rw-r--r--net/ipv4/xfrm4_input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c
index f9f922a0ba88..06814b6216dc 100644
--- a/net/ipv4/xfrm4_input.c
+++ b/net/ipv4/xfrm4_input.c
@@ -9,6 +9,7 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/slab.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/string.h> 14#include <linux/string.h>
14#include <linux/netfilter.h> 15#include <linux/netfilter.h>
@@ -26,8 +27,8 @@ static inline int xfrm4_rcv_encap_finish(struct sk_buff *skb)
26 if (skb_dst(skb) == NULL) { 27 if (skb_dst(skb) == NULL) {
27 const struct iphdr *iph = ip_hdr(skb); 28 const struct iphdr *iph = ip_hdr(skb);
28 29
29 if (ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, 30 if (ip_route_input_noref(skb, iph->daddr, iph->saddr,
30 skb->dev)) 31 iph->tos, skb->dev))
31 goto drop; 32 goto drop;
32 } 33 }
33 return dst_input(skb); 34 return dst_input(skb);
@@ -60,7 +61,7 @@ int xfrm4_transport_finish(struct sk_buff *skb, int async)
60 iph->tot_len = htons(skb->len); 61 iph->tot_len = htons(skb->len);
61 ip_send_check(iph); 62 ip_send_check(iph);
62 63
63 NF_HOOK(PF_INET, NF_INET_PRE_ROUTING, skb, skb->dev, NULL, 64 NF_HOOK(NFPROTO_IPV4, NF_INET_PRE_ROUTING, skb, skb->dev, NULL,
64 xfrm4_rcv_encap_finish); 65 xfrm4_rcv_encap_finish);
65 return 0; 66 return 0;
66} 67}
@@ -162,5 +163,4 @@ int xfrm4_rcv(struct sk_buff *skb)
162{ 163{
163 return xfrm4_rcv_spi(skb, ip_hdr(skb)->protocol, 0); 164 return xfrm4_rcv_spi(skb, ip_hdr(skb)->protocol, 0);
164} 165}
165
166EXPORT_SYMBOL(xfrm4_rcv); 166EXPORT_SYMBOL(xfrm4_rcv);