ipvs: do not use random local source address for tunnels
authorJulian Anastasov <ja@ssi.bg>
Sat, 27 Jun 2015 11:39:30 +0000 (14:39 +0300)
committerSimon Horman <horms@verge.net.au>
Tue, 14 Jul 2015 07:41:27 +0000 (16:41 +0900)
Michael Vallaly reports about wrong source address used
in rare cases for tunneled traffic. Looks like
__ip_vs_get_out_rt in 3.10+ is providing uninitialized
dest_dst->dst_saddr.ip because ip_vs_dest_dst_alloc uses
kmalloc. While we retry after seeing EINVAL from routing
for data that does not look like valid local address, it
still succeeded when this memory was previously used from
other dests and with different local addresses. As result,
we can use valid local address that is not suitable for
our real server.

Fix it by providing 0.0.0.0 every time our cache is refreshed.
By this way we will get preferred source address from routing.

Reported-by: Michael Vallaly <lvs@nolatency.com>
Fixes: 026ace060dfe ("ipvs: optimize dst usage for real server")
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>

No differences found
This page took 0.035801 seconds and 5 git commands to generate.