(no commit message)
[linux-2.6.git] / linux-2.6-220-lback-feat02.diff
1 diff -NurpP linux-2.6.22.16-vs2.3.0.32/include/linux/vserver/network.h linux-2.6.22.16-vs2.3.0.32.1/include/linux/vserver/network.h
2 --- linux-2.6.22.16-vs2.3.0.32/include/linux/vserver/network.h  2007-10-05 12:29:05 +0200
3 +++ linux-2.6.22.16-vs2.3.0.32.1/include/linux/vserver/network.h        2008-02-07 15:35:05 +0100
4 @@ -13,6 +13,7 @@
5  
6  #define NXF_SINGLE_IP          0x00000100
7  #define NXF_LBACK_REMAP                0x00000200
8 +#define NXF_LBACK_ALLOW                0x00000400
9  
10  #define NXF_HIDE_NETIF         0x02000000
11  #define NXF_HIDE_LBACK         0x04000000
12 diff -NurpP linux-2.6.22.16-vs2.3.0.32/kernel/vserver/inet.c linux-2.6.22.16-vs2.3.0.32.1/kernel/vserver/inet.c
13 --- linux-2.6.22.16-vs2.3.0.32/kernel/vserver/inet.c    2007-10-10 23:55:30 +0200
14 +++ linux-2.6.22.16-vs2.3.0.32.1/kernel/vserver/inet.c  2008-02-07 15:34:29 +0100
15 @@ -212,7 +212,8 @@ int ip_v4_find_src(struct nx_info *nxi, 
16                         fl->fl4_dst = nxi->v4_lback.s_addr;
17                 if (LOOPBACK(fl->fl4_src))
18                         fl->fl4_src = nxi->v4_lback.s_addr;
19 -       } else if (LOOPBACK(fl->fl4_dst))
20 +       } else if (LOOPBACK(fl->fl4_dst) &&
21 +               !nx_info_flags(nxi, NXF_LBACK_ALLOW, 0))
22                 return -EPERM;
23  
24         return 0;