* [GIT PULL nf] IPVS
@ 2012-01-27 1:45 Simon Horman
2012-01-27 1:45 ` [PATCH] ipvs: fix matching of fwmark templates during scheduling Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2012-01-27 1:45 UTC (permalink / raw)
To: Patrick McHardy, Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov
Hi Pablo,
please consider pulling
git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
to get the following fix from Julian.
The bug in question has been present since 2.6.37 and accordingly I would
like the fix considered for both 3.3 and stable. I have confirmed that it
applies and builds against your net tree, 3.2.2, 3.1.10, 3.0.18 and 2.6.39.4.
Julian Anastasov (1):
ipvs: fix matching of fwmark templates during scheduling
net/netfilter/ipvs/ip_vs_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ipvs: fix matching of fwmark templates during scheduling
2012-01-27 1:45 [GIT PULL nf] IPVS Simon Horman
@ 2012-01-27 1:45 ` Simon Horman
2012-02-09 15:15 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2012-01-27 1:45 UTC (permalink / raw)
To: Patrick McHardy, Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, stable, Simon Horman
From: Julian Anastasov <ja@ssi.bg>
Commit f11017ec2d1859c661f4e2b12c4a8d250e1f47cf (2.6.37)
moved the fwmark variable in subcontext that is invalidated before
reaching the ip_vs_ct_in_get call. As vaddr is provided as pointer
in the param structure make sure the fwmark variable is in
same context. As the fwmark templates can not be matched,
more and more template connections are created and the
controlled connections can not go to single real server.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Cc: stable@vger.kernel.org
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 093cc32..6dc7d7d 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -232,6 +232,7 @@ ip_vs_sched_persist(struct ip_vs_service *svc,
__be16 dport = 0; /* destination port to forward */
unsigned int flags;
struct ip_vs_conn_param param;
+ const union nf_inet_addr fwmark = { .ip = htonl(svc->fwmark) };
union nf_inet_addr snet; /* source network of the client,
after masking */
@@ -267,7 +268,6 @@ ip_vs_sched_persist(struct ip_vs_service *svc,
{
int protocol = iph.protocol;
const union nf_inet_addr *vaddr = &iph.daddr;
- const union nf_inet_addr fwmark = { .ip = htonl(svc->fwmark) };
__be16 vport = 0;
if (dst_port == svc->port) {
--
1.7.6.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ipvs: fix matching of fwmark templates during scheduling
2012-01-27 1:45 ` [PATCH] ipvs: fix matching of fwmark templates during scheduling Simon Horman
@ 2012-02-09 15:15 ` Pablo Neira Ayuso
2012-02-13 2:33 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2012-02-09 15:15 UTC (permalink / raw)
To: Simon Horman
Cc: Patrick McHardy, lvs-devel, netdev, netfilter-devel,
Wensong Zhang, Julian Anastasov, stable
On Fri, Jan 27, 2012 at 10:45:27AM +0900, Simon Horman wrote:
> From: Julian Anastasov <ja@ssi.bg>
>
> Commit f11017ec2d1859c661f4e2b12c4a8d250e1f47cf (2.6.37)
> moved the fwmark variable in subcontext that is invalidated before
> reaching the ip_vs_ct_in_get call. As vaddr is provided as pointer
> in the param structure make sure the fwmark variable is in
> same context. As the fwmark templates can not be matched,
> more and more template connections are created and the
> controlled connections can not go to single real server.
>
> Signed-off-by: Julian Anastasov <ja@ssi.bg>
> Cc: stable@vger.kernel.org
> Signed-off-by: Simon Horman <horms@verge.net.au>
Applied, thanks. I'll pass it to davem.
I'll pass it to stable once this hits Linus tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ipvs: fix matching of fwmark templates during scheduling
2012-02-09 15:15 ` Pablo Neira Ayuso
@ 2012-02-13 2:33 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2012-02-13 2:33 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: Patrick McHardy, lvs-devel, netdev, netfilter-devel,
Wensong Zhang, Julian Anastasov, stable
On Thu, Feb 09, 2012 at 04:15:07PM +0100, Pablo Neira Ayuso wrote:
> On Fri, Jan 27, 2012 at 10:45:27AM +0900, Simon Horman wrote:
> > From: Julian Anastasov <ja@ssi.bg>
> >
> > Commit f11017ec2d1859c661f4e2b12c4a8d250e1f47cf (2.6.37)
> > moved the fwmark variable in subcontext that is invalidated before
> > reaching the ip_vs_ct_in_get call. As vaddr is provided as pointer
> > in the param structure make sure the fwmark variable is in
> > same context. As the fwmark templates can not be matched,
> > more and more template connections are created and the
> > controlled connections can not go to single real server.
> >
> > Signed-off-by: Julian Anastasov <ja@ssi.bg>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Simon Horman <horms@verge.net.au>
>
> Applied, thanks. I'll pass it to davem.
>
> I'll pass it to stable once this hits Linus tree.
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-13 2:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-27 1:45 [GIT PULL nf] IPVS Simon Horman
2012-01-27 1:45 ` [PATCH] ipvs: fix matching of fwmark templates during scheduling Simon Horman
2012-02-09 15:15 ` Pablo Neira Ayuso
2012-02-13 2:33 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).