Skip to content

Commit e0aac52

Browse files
hormsummakynes
authored andcommitted
ipvs: fix matching of fwmark templates during scheduling
Commit f11017e (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> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 2983040 commit e0aac52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/netfilter/ipvs/ip_vs_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ ip_vs_sched_persist(struct ip_vs_service *svc,
232232
__be16 dport = 0; /* destination port to forward */
233233
unsigned int flags;
234234
struct ip_vs_conn_param param;
235+
const union nf_inet_addr fwmark = { .ip = htonl(svc->fwmark) };
235236
union nf_inet_addr snet; /* source network of the client,
236237
after masking */
237238

@@ -267,7 +268,6 @@ ip_vs_sched_persist(struct ip_vs_service *svc,
267268
{
268269
int protocol = iph.protocol;
269270
const union nf_inet_addr *vaddr = &iph.daddr;
270-
const union nf_inet_addr fwmark = { .ip = htonl(svc->fwmark) };
271271
__be16 vport = 0;
272272

273273
if (dst_port == svc->port) {

0 commit comments

Comments
 (0)