diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_nat_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index af8345fc4fbd..ed0ea64b8d04 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -97,7 +97,8 @@ int nf_xfrm_me_harder(struct net *net, struct sk_buff *skb, unsigned int family) dst = skb_dst(skb); if (dst->xfrm) dst = ((struct xfrm_dst *)dst)->route; - dst_hold(dst); + if (!dst_hold_safe(dst)) + return -EHOSTUNREACH; dst = xfrm_lookup(net, dst, &fl, skb->sk, 0); if (IS_ERR(dst)) |