Add network capability RAW_ICMP.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Sun, 12 Aug 2007 00:13:31 +0000 (00:13 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Sun, 12 Aug 2007 00:13:31 +0000 (00:13 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2585 94cd875c-1c1d-0410-91d2-eb244daf1a30

lib/ncaps-net.c
lib/vserver.h
src/nattribute.c

index be8ce9c..00ea843 100644 (file)
@@ -31,8 +31,7 @@
 #define DECL(STR, VAL) { STR, sizeof(STR)-1, VAL }
 
 static struct Mapping_uint64 const VALUES[] = {
-#warning Add the 'ncap' values here
-  DECL("", 0)
+  DECL("raw_icmp", VC_NXC_RAW_ICMP),
 };
 
 inline static char const *
index ff7245a..ee53775 100644 (file)
 #define VC_NXF_PERSISTENT              (1ULL<<38)
 
 
+// the network capabilities
+#define VC_NXC_RAW_ICMP                        0x00000100ull
+
+
 // the vserver specific limits
 #define VC_VLIMIT_NSOCK                        16
 #define VC_VLIMIT_OPENFD               17
index 5f732cc..f4ea7a1 100644 (file)
@@ -126,8 +126,8 @@ parseSecure(struct vc_net_flags * flags,
            struct vc_net_caps  * caps)
 {
     // TODO: generalize this
-  caps->ncaps = 0ull;
-  caps->cmask = 0ull;
+  caps->ncaps = VC_NXC_RAW_ICMP;
+  caps->cmask = VC_NXC_RAW_ICMP;
 
   flags->flagword = VC_NXF_HIDE_NETIF;
   flags->mask     = VC_NXF_HIDE_NETIF;