From: Daniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Date: Thu, 26 Jul 2007 23:08:00 +0000 (+0000)
Subject: Cleaner remove-all-of-AF_x
X-Git-Tag: util-vserver-0.30.214-1~52
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=adbacb0150091a3fafc287c8e410277fb1dd5ffc;p=util-vserver.git

Cleaner remove-all-of-AF_x
---

diff --git a/kernel/network.h b/kernel/network.h
index 2b84f07..073bc68 100644
--- a/kernel/network.h
+++ b/kernel/network.h
@@ -32,6 +32,7 @@
 #define NXA_TYPE_IPV6		2
 
 #define NXA_MOD_BCAST		(1<<8)
+#define NXA_MOD_ALL		(1<<9)
 
 #define NXA_TYPE_ANY		((uint16_t)-1)
 
diff --git a/lib/vserver-internal.h b/lib/vserver-internal.h
index 5c13bc5..c937320 100644
--- a/lib/vserver-internal.h
+++ b/lib/vserver-internal.h
@@ -210,6 +210,8 @@ inline static ALWAYSINLINE void vc_noop0() {}
 					 (X)==vcNET_IPV6   ? NXA_TYPE_IPV6     : \
 					 (X)==vcNET_IPV4B  ? (NXA_TYPE_IPV4 | NXA_MOD_BCAST) : \
 					 (X)==vcNET_IPV6B  ? (NXA_TYPE_IPV6 | NXA_MOD_BCAST) : \
+					 (X)==vcNET_IPV4A  ? (NXA_TYPE_IPV4 | NXA_MOD_ALL) : \
+					 (X)==vcNET_IPV6A  ? (NXA_TYPE_IPV6 | NXA_MOD_ALL) : \
 					 (X)==vcNET_ANY    ? NXA_TYPE_ANY      : \
 					 (X))
 #  define NETTYPE_KERNEL2USER(X)	((X)==NXA_TYPE_IPV4	? vcNET_IPV4   : \
diff --git a/lib/vserver.h b/lib/vserver.h
index 20f25db..c9b03b0 100644
--- a/lib/vserver.h
+++ b/lib/vserver.h
@@ -604,6 +604,7 @@ extern "C" {
 
   typedef enum { vcNET_IPV4=1,      vcNET_IPV6=2,
 		 vcNET_IPV4B=0x101, vcNET_IPV6B=0x102,
+		 vcNET_IPV4A=0x201, vcNET_IPV6A=0x202,
 		 vcNET_ANY=~0 }		vc_net_nx_type;
 
   struct vc_net_nx {
diff --git a/src/vip6-autod.c b/src/vip6-autod.c
index 0906612..63e9368 100644
--- a/src/vip6-autod.c
+++ b/src/vip6-autod.c
@@ -1,5 +1,5 @@
 /*
- * $Id$
+ * $Id: vip6-autod.c,v 1.2 2007/07/26 19:00:23 dhozac Exp $
  * Copyright (c) 2007 The Trustees of Princeton University
  * Author: Daniel Hokka Zakrisson <daniel@hozac.com>
  *
@@ -154,8 +154,8 @@ static void do_slices_autoconf(struct prefix_list *head)
 			continue;
 
 		nid = strtoul(de->d_name, NULL, 10);
-		addr.type = vcNET_IPV6;
-		addr.count = -1;
+		addr.type = vcNET_IPV6A;
+		addr.count = 0;
 		if (vc_net_remove(nid, &addr) == -1) {
 			perror("vc_net_remove");
 			continue;