https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.18.y&id=a360eb6f74b999a7546f2542c0d6483fdbb73461 Give preference to Linux-Vserver patch over upstream IPv4-mapped-to-IPv6 fix. If socket has a Linux-Vserver network context, then handle as previous, otherwise handle as per the upstream fix. --- a/net/ipv6/tcp_ipv6.c 2017-06-26 09:25:40.149207782 -0500 +++ b/net/ipv6/tcp_ipv6.c 2017-06-27 17:49:29.768742685 -0500 @@ -166,11 +166,17 @@ static int tcp_v6_connect(struct sock *s */ if (ipv6_addr_any(&usin->sin6_addr)) { - if (ipv6_addr_v4mapped(&sk->sk_v6_rcv_saddr)) - ipv6_addr_set_v4mapped(htonl(INADDR_LOOPBACK), - &usin->sin6_addr); + struct nx_info *nxi = sk->sk_nx_info; + + if (nxi && nx_info_has_v6(nxi)) + /* FIXME: remap lback? */ + usin->sin6_addr = nxi->v6.ip; else - usin->sin6_addr = in6addr_loopback; + if (ipv6_addr_v4mapped(&sk->sk_v6_rcv_saddr)) + ipv6_addr_set_v4mapped(htonl(INADDR_LOOPBACK), + &usin->sin6_addr); + else + usin->sin6_addr = in6addr_loopback; } addr_type = ipv6_addr_type(&usin->sin6_addr);