dect
/
linux-2.6
Archived
13
0
Fork 0

netfilter: nf_nat: remove obsolete rcu_read_unlock call

hlist walk in find_appropriate_src() is not protected anymore by rcu_read_lock(),
so rcu_read_unlock() is unnecessary if in_range() matches.

This bug was added in (c7232c9 netfilter: add protocol independent NAT core).

Signed-off-by: Ulrich Weber <ulrich.weber@sophos.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Ulrich Weber 2012-09-20 03:52:04 +00:00 committed by Pablo Neira Ayuso
parent b0cdb1d9a9
commit 136251d02f
1 changed files with 1 additions and 3 deletions

View File

@ -201,10 +201,8 @@ find_appropriate_src(struct net *net, u16 zone,
&ct->tuplehash[IP_CT_DIR_REPLY].tuple);
result->dst = tuple->dst;
if (in_range(l3proto, l4proto, result, range)) {
rcu_read_unlock();
if (in_range(l3proto, l4proto, result, range))
return 1;
}
}
}
return 0;