summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vserver-sources/old/2.1.1_rc25-r2/4416_vs2.1.1-sock-feat01.patch')
-rw-r--r--vserver-sources/old/2.1.1_rc25-r2/4416_vs2.1.1-sock-feat01.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/vserver-sources/old/2.1.1_rc25-r2/4416_vs2.1.1-sock-feat01.patch b/vserver-sources/old/2.1.1_rc25-r2/4416_vs2.1.1-sock-feat01.patch
new file mode 100644
index 0000000..06e1f85
--- /dev/null
+++ b/vserver-sources/old/2.1.1_rc25-r2/4416_vs2.1.1-sock-feat01.patch
@@ -0,0 +1,74 @@
+Index: linux-2.6.17/include/linux/vs_socket.h
+===================================================================
+--- linux-2.6.17.orig/include/linux/vs_socket.h
++++ linux-2.6.17/include/linux/vs_socket.h
+@@ -10,12 +10,14 @@
+
+ static inline int vx_sock_type(int family)
+ {
+- int type = 4;
++ int type = 5;
+
+- if (family > 0 && family < 3)
++ if (family >= 0 && family < 3)
+ type = family;
+ else if (family == PF_INET6)
+ type = 3;
++ else if (family == PF_PACKET)
++ type = 4;
+ return type;
+ }
+
+Index: linux-2.6.17/include/linux/vserver/cvirt_def.h
+===================================================================
+--- linux-2.6.17.orig/include/linux/vserver/cvirt_def.h
++++ linux-2.6.17/include/linux/vserver/cvirt_def.h
+@@ -90,7 +90,7 @@ struct _vx_sock_acc {
+ /* context sub struct */
+
+ struct _vx_cacct {
+- struct _vx_sock_acc sock[5][3];
++ struct _vx_sock_acc sock[6][3];
+ atomic_t slab[8];
+ atomic_t page[6][8];
+ };
+@@ -102,7 +102,7 @@ static inline void __dump_vx_cacct(struc
+ int i,j;
+
+ printk("\t_vx_cacct:");
+- for (i=0; i<5; i++) {
++ for (i=0; i<6; i++) {
+ struct _vx_sock_acc *ptr = cacct->sock[i];
+
+ printk("\t [%d] =", i);
+Index: linux-2.6.17/kernel/vserver/cvirt_init.h
+===================================================================
+--- linux-2.6.17.orig/kernel/vserver/cvirt_init.h
++++ linux-2.6.17/kernel/vserver/cvirt_init.h
+@@ -79,7 +79,7 @@ static inline void vx_info_init_cacct(st
+ int i,j;
+
+
+- for (i=0; i<5; i++) {
++ for (i=0; i<6; i++) {
+ for (j=0; j<3; j++) {
+ atomic_set(&cacct->sock[i][j].count, 0);
+ atomic_set(&cacct->sock[i][j].total, 0);
+Index: linux-2.6.17/kernel/vserver/cvirt_proc.h
+===================================================================
+--- linux-2.6.17.orig/kernel/vserver/cvirt_proc.h
++++ linux-2.6.17/kernel/vserver/cvirt_proc.h
+@@ -82,10 +82,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[] = { "UNSPEC", "UNIX", "INET", "INET6", "OTHER" };
++ static char *type[] = {
++ "UNSPEC", "UNIX", "INET", "INET6", "PACKET", "OTHER" };
+
+ length += sprintf(buffer + length, VX_SOCKA_TOP);
+- for (i=0; i<5; i++) {
++ for (i=0; i<6; i++) {
+ length += sprintf(buffer + length,
+ "%s:", type[i]);
+ for (j=0; j<3; j++) {