diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/fib_rules.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index cfb7d25c172d..21698f8c49ee 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -225,7 +225,8 @@ jumped: | |||
225 | err = ops->action(rule, fl, flags, arg); | 225 | err = ops->action(rule, fl, flags, arg); |
226 | 226 | ||
227 | if (err != -EAGAIN) { | 227 | if (err != -EAGAIN) { |
228 | if (likely(atomic_inc_not_zero(&rule->refcnt))) { | 228 | if ((arg->flags & FIB_LOOKUP_NOREF) || |
229 | likely(atomic_inc_not_zero(&rule->refcnt))) { | ||
229 | arg->rule = rule; | 230 | arg->rule = rule; |
230 | goto out; | 231 | goto out; |
231 | } | 232 | } |