IPVS Fixes for v3.14

Correction AF assignment by Michal Kubecek.
This resolves a problem whereby only the first 4 bytes of an IPv6
destination may be copied for a fwmark virtual service.

This problem appears to have been introduced by
be8be9eccbf2d908 "ipvs: Fix IPv4 FWMARK virtual services"
in 2.6.30.
ipvs: fix AF assignment in ip_vs_conn_new()

If a fwmark is passed to ip_vs_conn_new(), it is passed in
vaddr, not daddr. Therefore we should set AF to AF_UNSPEC in
vaddr assignment (like we do in ip_vs_ct_in_get()), otherwise we
may copy only first 4 bytes of an IPv6 address into cp->daddr.

Signed-off-by: Bogdano Arendartchuk <barendartchuk@suse.com>
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
1 file changed