Skip to contentSkip to conversation

ipvs: avoid lookup for fwmark 0

PATCH New Julian Anastasov 1 participant 1 message Mar 4, 2011

Subsystems (3)
lore
Share & tools
lore

Julian Anastasov

author maintainer
#0 lore raw

PATCH 1/1 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.

---

net/netfilter/ipvs/ip_vs_ctl.c +5 -3
@@ -411,9 +411,11 @@ ip_vs_service_get(struct net *net, int a
 	/*
 	 *	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>