[PATCH] ipvs: avoid lookup for fwmark 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




	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@xxxxxx>
---

--- lvs-test-2.6-8a80c79/net/netfilter/ipvs/ip_vs_ctl.c	2011-02-28 19:02:33.000000000 +0200
+++ linux/net/netfilter/ipvs/ip_vs_ctl.c	2011-03-03 19:11:17.300378354 +0200
@@ -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>
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Devel]     [Linux NFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [X.Org]

  Powered by Linux