diff options
author | Julian Anastasov <ja@ssi.bg> | 2011-03-04 13:26:17 +0300 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-03-15 03:36:48 +0300 |
commit | 097fc76a0805bdca17baf12cad9d3bcb215716a9 (patch) | |
tree | c05757a8ba465985f27a68328e8dc0b62bff54fd /net | |
parent | fe8f661f2c2bb058822f13f6f232e121bde1338f (diff) | |
download | linux-097fc76a0805bdca17baf12cad9d3bcb215716a9.tar.xz |
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.c | 8 |
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, /* * Check the table hashed by fwmark first */ - svc = __ip_vs_svc_fwm_find(net, af, fwmark); - if (fwmark && svc) - goto out; + if (fwmark) { + svc = __ip_vs_svc_fwm_find(net, af, fwmark); + if (svc) + goto out; + } /* * Check the table hashed by <protocol,addr,port> |