aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2011-03-04 05:26:17 -0500
committerSimon Horman <horms@verge.net.au>2011-03-14 20:36:48 -0400
commit097fc76a0805bdca17baf12cad9d3bcb215716a9 (patch)
treec05757a8ba465985f27a68328e8dc0b62bff54fd /net
parentfe8f661f2c2bb058822f13f6f232e121bde1338f (diff)
ipvs: avoid lookup for fwmark 0
Restore the previous behaviour to lookup for fwmark service only when fwmark is non-null. This saves only CPU. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Hans Schillstrom <hans@schillstrom.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index c73b0c831a2d..f0369d665088 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -411,9 +411,11 @@ ip_vs_service_get(struct net *net, int af, __u32 fwmark, __u16 protocol,
411 /* 411 /*
412 * Check the table hashed by fwmark first 412 * Check the table hashed by fwmark first
413 */ 413 */
414 svc = __ip_vs_svc_fwm_find(net, af, fwmark); 414 if (fwmark) {
415 if (fwmark && svc) 415 svc = __ip_vs_svc_fwm_find(net, af, fwmark);
416 goto out; 416 if (svc)
417 goto out;
418 }
417 419
418 /* 420 /*
419 * Check the table hashed by <protocol,addr,port> 421 * Check the table hashed by <protocol,addr,port>