Skip to contentSkip to conversation

ipvs: fwmark services don't have ports

PATCH In review Simon Horman 1 participant 2 messages Dec 7, 2009

Subsystems (4)
lore
Share & tools
lore

Simon Horman

author maintainer
#0 lore raw

PATCH 1/1 ipvs: fwmark services don't have ports

Make sure that the port for fwmark services is always zero, it seems that in some cases ipvsadm provides bogus port values for fwmark services. As observed by Deon van der Merwe, this manifests as a clients not being able to connect to the virtual service if persistence is set.

---

I believe that this fixes a bug and as such is suitable for -stable. However, Its taken a few release for anyone to bring this to our attention, so it doesn't seem to be causing much pain in the wild.

Discussion of this problem:
http://archive.linuxvirtualserver.org/html/lvs-users/2009-11/msg00043.html

net/netfilter/ipvs/ip_vs_ctl.c +2 -1
index e01061f..9a4ccd4 100644
@@ -1188,8 +1188,9 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
 	svc->af = u->af;
 	svc->protocol = u->protocol;
 	ip_vs_addr_copy(svc->af, &svc->addr, &u->addr);
-	svc->port = u->port;
 	svc->fwmark = u->fwmark;
+	if (!svc->fwmark)
+		svc->port = u->port;
 	svc->flags = u->flags;
 	svc->timeout = u->timeout * HZ;
 	svc->netmask = u->netmask;
author maintainer
#1 lore raw
Quoted 8 lines · Simon Horman

Make sure that the port for fwmark services is always zero, it seems that in some cases ipvsadm provides bogus port values for fwmark services. As observed by Deon van der Merwe, this manifests as a clients not being able to connect to the virtual service if persistence is set.

Quoted 8 lines

---

I believe that this fixes a bug and as such is suitable for -stable. However, Its taken a few release for anyone to bring this to our attention, so it doesn't seem to be causing much pain in the wild.

Discussion of this problem:
http://archive.linuxvirtualserver.org/html/lvs-users/2009-11/msg00043.html

Sorry for the noise. Please hold on this. There is still not consensus in the original thread.