diff -NurpP --minimal linux-2.6.12.2-vs2.0-rc5-net/kernel/vserver/network.c linux-2.6.12.2-vs2.0-rc5-net4/kernel/vserver/network.c --- linux-2.6.12.2-vs2.0-rc5-net/kernel/vserver/network.c 2005-07-05 19:05:56.000000000 +0200 +++ linux-2.6.12.2-vs2.0-rc5-net4/kernel/vserver/network.c 2005-07-07 16:14:41.000000000 +0200 @@ -595,6 +595,11 @@ int vc_net_add(uint32_t nid, void __user switch (vc_data.type) { case NXA_TYPE_IPV4: + if (vc_data.count > 4) { + ret = -EINVAL; + break; + } + index = 0; while ((index < vc_data.count) && ((pos = nxi->nbipv4) < NB_IPV4ROOT)) { diff -NurpP --minimal linux-2.6.12.2-vs2.0-rc5-net/kernel/vserver/switch.c linux-2.6.12.2-vs2.0-rc5-net4/kernel/vserver/switch.c --- linux-2.6.12.2-vs2.0-rc5-net/kernel/vserver/switch.c 2005-07-05 19:05:56.000000000 +0200 +++ linux-2.6.12.2-vs2.0-rc5-net4/kernel/vserver/switch.c 2005-07-07 16:14:53.000000000 +0200 @@ -218,12 +218,10 @@ long do_vserver(uint32_t cmd, uint32_t i return vc_net_create(id, data); case VCMD_net_migrate: return vc_net_migrate(id, data); -#ifndef CONFIG_VSERVER_LEGACYNET case VCMD_net_add: return vc_net_add(id, data); case VCMD_net_remove: return vc_net_remove(id, data); -#endif } return -ENOSYS;