diff -NurpP --minimal linux-2.6.22.6-vs2.3.0.20.1/include/linux/vs_inet.h linux-2.6.22.6-vs2.3.0.20.2.1/include/linux/vs_inet.h
--- linux-2.6.22.6-vs2.3.0.20.1/include/linux/vs_inet.h	2007-08-29 19:52:52 +0200
+++ linux-2.6.22.6-vs2.3.0.20.2.1/include/linux/vs_inet.h	2007-09-18 11:15:32 +0200
@@ -7,14 +7,15 @@
 
 #define IPI_LOOPBACK	htonl(INADDR_LOOPBACK)
 
-#define NXAV4(a)	NIPQUAD((a)->ip), NIPQUAD((a)->mask), (a)->type
-#define NXAV4_FMT	"[" NIPQUAD_FMT "/" NIPQUAD_FMT ":%04x]"
+#define NXAV4(a)	NIPQUAD((a)->ip[0]), NIPQUAD((a)->ip[1]), \
+			NIPQUAD((a)->mask), (a)->type
+#define NXAV4_FMT	"[" NIPQUAD_FMT "-" NIPQUAD_FMT "/" NIPQUAD_FMT ":%04x]"
 
 
 static inline
 int v4_addr_match(struct nx_addr_v4 *nxa, __be32 addr, uint16_t tmask)
 {
-	__be32 ip = nxa->ip.s_addr;
+	__be32 ip = nxa->ip[0].s_addr;
 	__be32 mask = nxa->mask.s_addr;
 	__be32 bcast = ip | ~mask;
 	int ret = 0;
@@ -32,8 +33,8 @@ int v4_addr_match(struct nx_addr_v4 *nxa
 		ret = ((tmask & NXA_MOD_BCAST) && (addr == bcast));
 		break;
 	case NXA_TYPE_RANGE:
-		ret = ((nxa->ip.s_addr <= addr) &&
-			(nxa->mask.s_addr > addr));
+		ret = ((nxa->ip[0].s_addr <= addr) &&
+			(nxa->ip[1].s_addr > addr));
 		break;
 	case NXA_TYPE_ANY:
 		ret = 2;
@@ -87,7 +88,7 @@ static inline
 int v4_nx_addr_match(struct nx_addr_v4 *nxa, struct nx_addr_v4 *addr, uint16_t mask)
 {
 	/* FIXME: needs full range checks */
-	return v4_addr_match(nxa, addr->ip.s_addr, mask);
+	return v4_addr_match(nxa, addr->ip[0].s_addr, mask);
 }
 
 static inline
@@ -237,7 +238,7 @@ int v4_map_sock_addr(struct inet_sock *i
 	if (nxi) {
 		if (saddr == INADDR_ANY) {
 			if (nx_info_flags(nxi, NXF_SINGLE_IP, 0))
-				baddr = nxi->v4.ip.s_addr;
+				baddr = nxi->v4.ip[0].s_addr;
 		} else if (saddr == IPI_LOOPBACK) {
 			if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
 				baddr = nxi->v4_lback.s_addr;
diff -NurpP --minimal linux-2.6.22.6-vs2.3.0.20.1/include/linux/vserver/network.h linux-2.6.22.6-vs2.3.0.20.2.1/include/linux/vserver/network.h
--- linux-2.6.22.6-vs2.3.0.20.1/include/linux/vserver/network.h	2007-08-12 00:32:29 +0200
+++ linux-2.6.22.6-vs2.3.0.20.2.1/include/linux/vserver/network.h	2007-09-18 10:47:34 +0200
@@ -73,7 +73,7 @@ static inline uint64_t __nxf_init_set(vo
 
 struct nx_addr_v4 {
 	struct nx_addr_v4 *next;
-	struct in_addr ip;
+	struct in_addr ip[2];
 	struct in_addr mask;
 	uint16_t type;
 	uint16_t flags;
diff -NurpP --minimal linux-2.6.22.6-vs2.3.0.20.1/include/net/route.h linux-2.6.22.6-vs2.3.0.20.2.1/include/net/route.h
--- linux-2.6.22.6-vs2.3.0.20.1/include/net/route.h	2007-08-29 21:04:15 +0200
+++ linux-2.6.22.6-vs2.3.0.20.2.1/include/net/route.h	2007-09-18 03:52:05 +0200
@@ -147,7 +147,7 @@ static inline char rt_tos2priority(u8 to
 	return ip_tos2prio[IPTOS_TOS(tos)>>1];
 }
 
-#include "route_vs.h"
+extern int ip_v4_find_src(struct nx_info *, struct rtable **, struct flowi *);
 
 static inline int ip_route_connect(struct rtable **rp, __be32 dst,
 				   __be32 src, u32 tos, int oif, u8 protocol,
diff -NurpP --minimal linux-2.6.22.6-vs2.3.0.20.1/include/net/route_vs.h linux-2.6.22.6-vs2.3.0.20.2.1/include/net/route_vs.h
--- linux-2.6.22.6-vs2.3.0.20.1/include/net/route_vs.h	2007-08-05 20:53:13 +0200
+++ linux-2.6.22.6-vs2.3.0.20.2.1/include/net/route_vs.h	1970-01-01 01:00:00 +0100
@@ -1,57 +0,0 @@
-
-static inline
-int ip_v4_find_src(struct nx_info *nxi, struct rtable **rp, struct flowi *fl)
-{
-	if (!nxi || !NX_IPV4(nxi))
-		return 0;
-
-	/* single IP is unconditional */
-	if (nx_info_flags(nxi, NXF_SINGLE_IP, 0) &&
-		(fl->fl4_src == INADDR_ANY))
-		fl->fl4_src = nxi->v4.ip.s_addr;
-
-	if (fl->fl4_src == INADDR_ANY) {
-		struct nx_addr_v4 *ptr;
-		__be32 found;
-		int err;
-
-		err = __ip_route_output_key(rp, fl);
-		if (!err) {
-			found = (*rp)->rt_src;
-			ip_rt_put(*rp);	
-			if (v4_addr_in_nx_info(nxi, found, -1))
-				goto found;
-		}
-
-		for (ptr = &nxi->v4; ptr; ptr = ptr->next) {
-			fl->fl4_src = ptr->ip.s_addr;
-			err = __ip_route_output_key(rp, fl);
-			if (err)
-				continue;
-
-			found = (*rp)->rt_src;
-			ip_rt_put(*rp);
-			if (v4_addr_in_nx_info(nxi, found, -1))
-				goto found;	
-		}
-		/* still no source ip? */
-		found = (fl->fl4_dst == IPI_LOOPBACK)
-			? IPI_LOOPBACK : nxi->v4_lback.s_addr;
-	found:
-		/* assign src ip to flow */
-		fl->fl4_src = found;
-		
-	} else {
-		if (!v4_addr_in_nx_info(nxi, fl->fl4_src, -1))
-			return -EPERM;
-	}
-
-	if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0)) {
-		if (fl->fl4_dst == IPI_LOOPBACK)
-			fl->fl4_dst = nxi->v4_lback.s_addr;
-		if (fl->fl4_src == IPI_LOOPBACK)
-			fl->fl4_src = nxi->v4_lback.s_addr;
-	}
-	return 0;
-}
-
diff -NurpP --minimal linux-2.6.22.6-vs2.3.0.20.1/kernel/vserver/inet.c linux-2.6.22.6-vs2.3.0.20.2.1/kernel/vserver/inet.c
--- linux-2.6.22.6-vs2.3.0.20.1/kernel/vserver/inet.c	2007-08-29 19:54:12 +0200
+++ linux-2.6.22.6-vs2.3.0.20.2.1/kernel/vserver/inet.c	2007-09-18 12:15:07 +0200
@@ -1,7 +1,7 @@
 
 #include <linux/vserver/debug.h>
-#include <linux/vs_inet.h>
 #include <linux/vs_inet6.h>
+#include <net/route.h>
 #include <net/addrconf.h>
 
 
@@ -134,3 +134,79 @@ out:
 	return ret;
 }
 
+int ip_v4_find_src(struct nx_info *nxi, struct rtable **rp, struct flowi *fl)
+{
+	if (!nxi || !NX_IPV4(nxi))
+		return 0;
+
+	vxdprintk(VXD_CBIT(net, 4),
+		"ip_v4_find_src(%p[#%u]) " NIPQUAD_FMT " -> " NIPQUAD_FMT,	
+		nxi, nxi ? nxi->nx_id : 0,
+		NIPQUAD(fl->fl4_src), NIPQUAD(fl->fl4_dst));
+
+	/* single IP is unconditional */
+	if (nx_info_flags(nxi, NXF_SINGLE_IP, 0) &&
+		(fl->fl4_src == INADDR_ANY))
+		fl->fl4_src = nxi->v4.ip[0].s_addr;
+
+	if (fl->fl4_src == INADDR_ANY) {
+		struct nx_addr_v4 *ptr;
+		__be32 found;
+		int err;
+
+		err = __ip_route_output_key(rp, fl);
+		if (!err) {
+			found = (*rp)->rt_src;
+			ip_rt_put(*rp);	
+			vxdprintk(VXD_CBIT(net, 4),
+				"ip_v4_find_src(%p[#%u]) rok[%u]: " NIPQUAD_FMT,
+				nxi, nxi ? nxi->nx_id : 0, fl->oif, NIPQUAD(found));
+			if (v4_addr_in_nx_info(nxi, found, -1))
+				goto found;
+		}
+
+		for (ptr = &nxi->v4; ptr; ptr = ptr->next) {
+			__be32 primary = ptr->ip[0].s_addr;
+			__be32 mask = ptr->mask.s_addr;
+			__be32 net = primary & mask;
+
+			vxdprintk(VXD_CBIT(net, 4), "ip_v4_find_src(%p[#%u]) chk: "
+				NIPQUAD_FMT "/" NIPQUAD_FMT "/" NIPQUAD_FMT,
+				nxi, nxi ? nxi->nx_id : 0, NIPQUAD(primary),
+				NIPQUAD(mask), NIPQUAD(net));
+			if ((found & mask) != net)
+				continue;
+
+			fl->fl4_src = primary;
+			err = __ip_route_output_key(rp, fl);
+			vxdprintk(VXD_CBIT(net, 4),
+				"ip_v4_find_src(%p[#%u]) rok[%u]: " NIPQUAD_FMT,
+				nxi, nxi ? nxi->nx_id : 0, fl->oif, NIPQUAD(primary));
+			if (!err) {
+				found = (*rp)->rt_src;
+				ip_rt_put(*rp);	
+				if (found == primary)
+					goto found;
+			}
+		}
+		/* still no source ip? */
+		found = (fl->fl4_dst == IPI_LOOPBACK)
+			? IPI_LOOPBACK : nxi->v4_lback.s_addr;
+	found:
+		/* assign src ip to flow */
+		fl->fl4_src = found;
+		
+	} else {
+		if (!v4_addr_in_nx_info(nxi, fl->fl4_src, -1))
+			return -EPERM;
+	}
+
+	if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0)) {
+		if (fl->fl4_dst == IPI_LOOPBACK)
+			fl->fl4_dst = nxi->v4_lback.s_addr;
+		if (fl->fl4_src == IPI_LOOPBACK)
+			fl->fl4_src = nxi->v4_lback.s_addr;
+	}
+	return 0;
+}
+
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
@@ -587,7 +587,7 @@ int vc_net_migrate(struct nx_info *nxi, 
 
 
 
-int do_add_v4_addr(struct nx_info *nxi, __be32 ip, __be32 mask,
+int do_add_v4_addr(struct nx_info *nxi, __be32 ip, __be32 ip2, __be32 mask,
 	uint16_t type, uint16_t flags)
 {
 	struct nx_addr_v4 *nxa = &nxi->v4;
@@ -606,7 +606,8 @@ int do_add_v4_addr(struct nx_info *nxi, 
 		/* remove single ip for ip list */
 		nxi->nx_flags &= ~NXF_SINGLE_IP;
 
-	nxa->ip.s_addr = ip;
+	nxa->ip[0].s_addr = ip;
+	nxa->ip[1].s_addr = ip2;
 	nxa->mask.s_addr = mask;
 	nxa->type = type;
 	nxa->flags = flags;
@@ -629,7 +630,7 @@ int vc_net_add(struct nx_info *nxi, void
 
 		index = 0;
 		while (index < vc_data.count) {
-			ret = do_add_v4_addr(nxi, vc_data.ip[index].s_addr,
+			ret = do_add_v4_addr(nxi, vc_data.ip[index].s_addr, 0,
 				vc_data.mask[index].s_addr, NXA_TYPE_ADDR, 0);
 			if (ret)
 				return ret;
@@ -686,8 +687,8 @@ int vc_net_add_ipv4(struct nx_info *nxi,
 	case NXA_TYPE_ADDR:
 	case NXA_TYPE_RANGE:
 	case NXA_TYPE_MASK:
-		return do_add_v4_addr(nxi, vc_data.ip.s_addr, vc_data.mask.s_addr,
-			vc_data.type, vc_data.flags);
+		return do_add_v4_addr(nxi, vc_data.ip.s_addr, 0, 
+			vc_data.mask.s_addr, vc_data.type, vc_data.flags);
 
 	case NXA_TYPE_ADDR | NXA_MOD_BCAST:
 		nxi->v4_bcast = vc_data.ip;
