diff options
Diffstat (limited to 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/net/route.h b/include/net/route.h index cb0a76d9dde1..57dfc6850d37 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -189,10 +189,11 @@ static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, rcu_read_lock(); err = ip_route_input_noref(skb, dst, src, tos, devin); - if (!err) - skb_dst_force_safe(skb); - if (!skb_dst(skb)) - err = -EINVAL; + if (!err) { + skb_dst_force(skb); + if (!skb_dst(skb)) + err = -EINVAL; + } rcu_read_unlock(); return err; |