summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-05-18 15:36:06 -0700
committerDavid S. Miller <davem@davemloft.net>2010-05-18 15:36:06 -0700
commite9d3e084975869754d16f639378675c353560be9 (patch)
tree3f933fea12746b24247ccec79cb4a1fbdf50833b /include/net
parente29f5dbc9e9719af158a960e5c1d16f32740ebc3 (diff)
ipv6: Replace inet6_ifaddr->dead with state
This patch replaces the boolean dead flag on inet6_ifaddr with a state enum. This allows us to roll back changes when deleting an address according to whether DAD has completed or not. This patch only adds the state field and does not change the logic. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/if_inet6.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 13f9fc086d54..f95ff8d9aa47 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -32,6 +32,13 @@
#ifdef __KERNEL__
+enum {
+ INET6_IFADDR_STATE_DAD,
+ INET6_IFADDR_STATE_POSTDAD,
+ INET6_IFADDR_STATE_UP,
+ INET6_IFADDR_STATE_DEAD,
+};
+
struct inet6_ifaddr {
struct in6_addr addr;
__u32 prefix_len;
@@ -40,6 +47,9 @@ struct inet6_ifaddr {
__u32 prefered_lft;
atomic_t refcnt;
spinlock_t lock;
+ spinlock_t state_lock;
+
+ int state;
__u8 probes;
__u8 flags;
@@ -62,8 +72,6 @@ struct inet6_ifaddr {
struct inet6_ifaddr *ifpub;
int regen_count;
#endif
-
- int dead;
struct rcu_head rcu;
};