From: Daniel Hokka Zakrisson Date: Sun, 12 Aug 2007 00:13:31 +0000 (+0000) Subject: Add network capability RAW_ICMP. X-Git-Tag: release-0.30.214~20 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=633c66aeb70cd0b0c016c04502c28da6da5c9cfa;p=util-vserver.git Add network capability RAW_ICMP. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2585 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/lib/ncaps-net.c b/lib/ncaps-net.c index be8ce9c..00ea843 100644 --- a/lib/ncaps-net.c +++ b/lib/ncaps-net.c @@ -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 * diff --git a/lib/vserver.h b/lib/vserver.h index ff7245a..ee53775 100644 --- a/lib/vserver.h +++ b/lib/vserver.h @@ -248,6 +248,10 @@ #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 diff --git a/src/nattribute.c b/src/nattribute.c index 5f732cc..f4ea7a1 100644 --- a/src/nattribute.c +++ b/src/nattribute.c @@ -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;