]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_nat: don't check if the tuple is unique when there isn't any other...
authorChangli Gao <xiaosuo@gmail.com>
Mon, 2 Aug 2010 15:35:49 +0000 (17:35 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 2 Aug 2010 15:35:49 +0000 (17:35 +0200)
commit599b68aa30b76819fc11a7be1a54cb426fdb1ed8
tree695cfb4bff794c4815f8d55e89426107ad3699de
parente1f2d9f3fc482e6d603eb3cdc79b87d20d736fb8
netfilter: nf_nat: don't check if the tuple is unique when there isn't any other choice

The tuple got from unique_tuple() doesn't need to be really unique, so the
check for the unique tuple isn't necessary, when there isn't any other
choice. Eliminating the unnecessary nf_nat_used_tuple() can save some CPU
cycles too.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv4/netfilter/nf_nat_proto_common.c
net/ipv4/netfilter/nf_nat_proto_gre.c
net/ipv4/netfilter/nf_nat_proto_icmp.c