summaryrefslogtreecommitdiffstats
path: root/net/netfilter/ipvs/ip_vs_ctl.c
diff options
context:
space:
mode:
authorJulian Anastasov2015-06-27 13:39:30 +0200
committerSimon Horman2015-07-14 09:41:27 +0200
commit4754957f04f5f368792a0eb7dab0ae89fb93dcfd (patch)
treeb26da24dccaaa7d2a30c40cb06290efcc1cada26 /net/netfilter/ipvs/ip_vs_ctl.c
parentipvs: fix ipv6 route unreach panic (diff)
downloadkernel-qcow2-linux-4754957f04f5f368792a0eb7dab0ae89fb93dcfd.tar.gz
kernel-qcow2-linux-4754957f04f5f368792a0eb7dab0ae89fb93dcfd.tar.xz
kernel-qcow2-linux-4754957f04f5f368792a0eb7dab0ae89fb93dcfd.zip
ipvs: do not use random local source address for tunnels
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>
Diffstat (limited to 'net/netfilter/ipvs/ip_vs_ctl.c')
0 files changed, 0 insertions, 0 deletions