diff -NurpP --minimal linux-2.6.17.8-vs2.1.1-rc29.1.4/include/linux/vs_socket.h linux-2.6.17.8-vs2.1.1-rc29.2/include/linux/vs_socket.h
--- linux-2.6.17.8-vs2.1.1-rc29.1.4/include/linux/vs_socket.h	2006-07-09 23:04:01 +0200
+++ linux-2.6.17.8-vs2.1.1-rc29.2/include/linux/vs_socket.h	2006-08-19 03:12:48 +0200
@@ -10,15 +10,20 @@
 
 static inline int vx_sock_type(int family)
 {
-	int type = 5;
-
-	if (family >= 0 && family < 3)
-		type = family;
-	else if (family == PF_INET6)
-		type = 3;
-	else if (family == PF_PACKET)
-		type = 4;
-	return type;
+	switch (family) {
+	case PF_UNSPEC:
+		return VXA_SOCK_UNSPEC;
+	case PF_UNIX:
+		return VXA_SOCK_UNIX;
+	case PF_INET:
+		return VXA_SOCK_INET;
+	case PF_INET6:
+		return VXA_SOCK_INET6;
+	case PF_PACKET:
+		return VXA_SOCK_PACKET;
+	default:
+		return VXA_SOCK_OTHER;
+	}
 }
 
 #define vx_acc_sock(v,f,p,s) \
diff -NurpP --minimal linux-2.6.17.8-vs2.1.1-rc29.1.4/include/linux/vserver/cacct_cmd.h linux-2.6.17.8-vs2.1.1-rc29.2/include/linux/vserver/cacct_cmd.h
--- linux-2.6.17.8-vs2.1.1-rc29.1.4/include/linux/vserver/cacct_cmd.h	2006-08-05 04:28:29 +0200
+++ linux-2.6.17.8-vs2.1.1-rc29.2/include/linux/vserver/cacct_cmd.h	2006-08-19 02:55:24 +0200
@@ -13,16 +13,6 @@ struct	vcmd_sock_stat_v0 {
 };
 
 
-enum sock_stat_field {
-	SOCK_UNSPEC=0,
-	SOCK_UNIX,
-	SOCK_INET,
-	SOCK_INET6,
-	SOCK_PACKET,
-	SOCK_OTHER,
-};
-
-
 #ifdef	__KERNEL__
 
 #include <linux/compiler.h>
diff -NurpP --minimal linux-2.6.17.8-vs2.1.1-rc29.1.4/include/linux/vserver/cacct_def.h linux-2.6.17.8-vs2.1.1-rc29.2/include/linux/vserver/cacct_def.h
--- linux-2.6.17.8-vs2.1.1-rc29.1.4/include/linux/vserver/cacct_def.h	2006-07-30 16:49:23 +0200
+++ linux-2.6.17.8-vs2.1.1-rc29.2/include/linux/vserver/cacct_def.h	2006-08-19 03:15:08 +0200
@@ -4,6 +4,16 @@
 #include <asm/atomic.h>
 
 
+enum sock_acc_field {
+	VXA_SOCK_UNSPEC = 0,
+	VXA_SOCK_UNIX,
+	VXA_SOCK_INET,
+	VXA_SOCK_INET6,
+	VXA_SOCK_PACKET,
+	VXA_SOCK_OTHER,
+	VXA_SOCK_SIZE	/* array size */
+};
+
 struct _vx_sock_acc {
 	atomic_t count;
 	atomic_t total;
@@ -12,7 +22,7 @@ struct _vx_sock_acc {
 /* context sub struct */
 
 struct _vx_cacct {
-	struct _vx_sock_acc sock[6][3];
+	struct _vx_sock_acc sock[VXA_SOCK_SIZE][3];
 	atomic_t slab[8];
 	atomic_t page[6][8];
 };
diff -NurpP --minimal linux-2.6.17.8-vs2.1.1-rc29.1.4/kernel/vserver/cacct_init.h linux-2.6.17.8-vs2.1.1-rc29.2/kernel/vserver/cacct_init.h
--- linux-2.6.17.8-vs2.1.1-rc29.1.4/kernel/vserver/cacct_init.h	2006-07-30 16:52:43 +0200
+++ linux-2.6.17.8-vs2.1.1-rc29.2/kernel/vserver/cacct_init.h	2006-08-19 02:59:48 +0200
@@ -5,7 +5,7 @@ static inline void vx_info_init_cacct(st
 	int i,j;
 
 
-	for (i=0; i<6; i++) {
+	for (i=0; i<VXA_SOCK_SIZE; i++) {
 		for (j=0; j<3; j++) {
 			atomic_set(&cacct->sock[i][j].count, 0);
 			atomic_set(&cacct->sock[i][j].total, 0);
diff -NurpP --minimal linux-2.6.17.8-vs2.1.1-rc29.1.4/kernel/vserver/cacct_proc.h linux-2.6.17.8-vs2.1.1-rc29.2/kernel/vserver/cacct_proc.h
--- linux-2.6.17.8-vs2.1.1-rc29.1.4/kernel/vserver/cacct_proc.h	2006-07-30 17:01:23 +0200
+++ linux-2.6.17.8-vs2.1.1-rc29.2/kernel/vserver/cacct_proc.h	2006-08-19 03:01:43 +0200
@@ -20,11 +20,11 @@ static inline long vx_sock_total(struct 
 static inline int vx_info_proc_cacct(struct _vx_cacct *cacct, char *buffer)
 {
 	int i,j, length = 0;
-	static char *type[] = {
+	static char *type[VXA_SOCK_SIZE] = {
 		"UNSPEC", "UNIX", "INET", "INET6", "PACKET", "OTHER" };
 
 	length += sprintf(buffer + length, VX_SOCKA_TOP);
-	for (i=0; i<6; i++) {
+	for (i=0; i<VXA_SOCK_SIZE; i++) {
 		length += sprintf(buffer + length,
 			"%s:", type[i]);
 		for (j=0; j<3; j++) {
diff -NurpP --minimal linux-2.6.17.8-vs2.1.1-rc29.1.4/kernel/vserver/cvirt.c linux-2.6.17.8-vs2.1.1-rc29.2/kernel/vserver/cvirt.c
--- linux-2.6.17.8-vs2.1.1-rc29.1.4/kernel/vserver/cvirt.c	2006-07-30 16:50:56 +0200
+++ linux-2.6.17.8-vs2.1.1-rc29.2/kernel/vserver/cvirt.c	2006-08-19 02:22:35 +0200
@@ -18,7 +18,6 @@
 #include <linux/vs_cvirt.h>
 #include <linux/vserver/switch.h>
 #include <linux/vserver/cvirt_cmd.h>
-#include <linux/vserver/cacct_cmd.h>
 
 #include <asm/errno.h>
 #include <asm/uaccess.h>
