immortalwrt/target/linux/generic/hack-4.14/950-fix-crash-nf_xfrm_me_harder.patch

12 lines
289 B
Diff
Raw Normal View History

2019-07-11 22:34:41 +08:00
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -95,6 +95,8 @@ int nf_xfrm_me_harder(struct net *net, s
2019-07-11 22:34:41 +08:00
return err;
dst = skb_dst(skb);
+ if (!dst)
+ return -EHOSTUNREACH;
if (dst->xfrm)
dst = ((struct xfrm_dst *)dst)->route;
if (!dst_hold_safe(dst))