提交 097fc76a 编写于 作者: J Julian Anastasov 提交者: Simon Horman

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: NJulian Anastasov <ja@ssi.bg>
Signed-off-by: NHans Schillstrom <hans@schillstrom.com>
Signed-off-by: NSimon Horman <horms@verge.net.au>
上级 fe8f661f
...@@ -411,9 +411,11 @@ ip_vs_service_get(struct net *net, int af, __u32 fwmark, __u16 protocol, ...@@ -411,9 +411,11 @@ ip_vs_service_get(struct net *net, int af, __u32 fwmark, __u16 protocol,
/* /*
* Check the table hashed by fwmark first * Check the table hashed by fwmark first
*/ */
svc = __ip_vs_svc_fwm_find(net, af, fwmark); if (fwmark) {
if (fwmark && svc) svc = __ip_vs_svc_fwm_find(net, af, fwmark);
goto out; if (svc)
goto out;
}
/* /*
* Check the table hashed by <protocol,addr,port> * Check the table hashed by <protocol,addr,port>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册