--- linux-2.6.22.6-vs2.3.0.20.2.1/include/linux/vserver/network.h 2007-09-18 10:47:34 +0200 +++ linux-2.6.22.6-vs2.3.0.20.2.1/include/linux/vserver/network.h 2007-09-18 10:47:34 +0200 @@ -81,7 +81,7 @@ struct nx_addr_v6 { struct nx_addr_v6 *next; - struct in6_addr ip; + struct in6_addr ip[2]; struct in6_addr mask; uint32_t prefix; uint16_t type; --- linux-2.6.22.6-vs2.3.0.20.1/include/linux/vs_inet6.h 2007-08-29 19:54:12 +0200 +++ linux-2.6.22.6-vs2.3.0.20.2.1/include/linux/vs_inet6.h 2007-09-18 11:10:19 +0200 @@ -6,7 +6,7 @@ #include "vserver/network.h" #include "vserver/debug.h" -#define NXAV6(a) NIP6((a)->ip), NIP6((a)->mask), (a)->prefix, (a)->type +#define NXAV6(a) NIP6((a)->ip[0]), NIP6((a)->mask), (a)->prefix, (a)->type #define NXAV6_FMT "[" NIP6_FMT "/" NIP6_FMT "/%d:%04x]" @@ -18,9 +18,9 @@ int v6_addr_match(struct nx_addr_v6 *nxa { switch (nxa->type & mask) { case NXA_TYPE_MASK: - return ipv6_masked_addr_cmp(&nxa->ip, &nxa->mask, addr); + return ipv6_masked_addr_cmp(&nxa->ip[0], &nxa->mask, addr); case NXA_TYPE_ADDR: - return ipv6_addr_equal(&nxa->ip, addr); + return ipv6_addr_equal(&nxa->ip[0], addr); case NXA_TYPE_ANY: return 1; default: @@ -46,7 +46,7 @@ static inline int v6_nx_addr_match(struct nx_addr_v6 *nxa, struct nx_addr_v6 *addr, uint16_t mask) { /* FIXME: needs full range checks */ - return v6_addr_match(nxa, &addr->ip, mask); + return v6_addr_match(nxa, &addr->ip[0], mask); } static inline --- linux-2.6.22.6-vs2.3.0.20.1/net/ipv6/tcp_ipv6.c 2007-09-05 03:06:12 +0200 +++ linux-2.6.22.6-vs2.3.0.20.2.1/net/ipv6/tcp_ipv6.c 2007-09-18 11:45:18 +0200 @@ -166,7 +166,7 @@ static int tcp_v6_connect(struct sock *s if (nxi && nx_info_has_v6(nxi)) /* FIXME: remap lback? */ - usin->sin6_addr = nxi->v6.ip; + usin->sin6_addr = nxi->v6.ip[0]; else usin->sin6_addr.s6_addr[15] = 0x1; } diff -NurpP --minimal linux-2.6.22.6-vs2.3.0.20.1/kernel/vserver/network.c linux-2.6.22.6-vs2.3.0.20.2.1/kernel/vserver/network.c --- linux-2.6.22.6-vs2.3.0.20.1/kernel/vserver/network.c 2007-08-16 03:34:12 +0200 +++ linux-2.6.22.6-vs2.3.0.20.2.1/kernel/vserver/network.c 2007-09-18 11:07:51 +0200 @@ -729,7 +730,7 @@ int vc_net_remove_ipv4(struct nx_info *n #ifdef CONFIG_IPV6 int do_add_v6_addr(struct nx_info *nxi, - struct in6_addr *ip, struct in6_addr *mask, + struct in6_addr *ip, struct in6_addr *ip2, struct in6_addr *mask, uint32_t prefix, uint16_t type, uint16_t flags) { struct nx_addr_v6 *nxa = &nxi->v6; @@ -744,7 +745,8 @@ int do_add_v6_addr(struct nx_info *nxi, return PTR_ERR(nxa); } - nxa->ip = *ip; + nxa->ip[0] = *ip; + nxa->ip[1] = *ip2; nxa->mask = *mask; nxa->prefix = prefix; nxa->type = type; @@ -763,8 +765,9 @@ int vc_net_add_ipv6(struct nx_info *nxi, switch (vc_data.type) { case NXA_TYPE_ADDR: case NXA_TYPE_MASK: - return do_add_v6_addr(nxi, &vc_data.ip, &vc_data.mask, - vc_data.prefix, vc_data.type, vc_data.flags); + return do_add_v6_addr(nxi, &vc_data.ip, &vc_data.ip, + &vc_data.mask, vc_data.prefix, + vc_data.type, vc_data.flags); default: return -EINVAL; }