From patchwork Sat Sep 5 01:38:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Haley X-Patchwork-Id: 33023 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 9598DB6F20 for ; Sat, 5 Sep 2009 11:38:18 +1000 (EST) Received: by ozlabs.org (Postfix) id 7B5A6DDD0C; Sat, 5 Sep 2009 11:38:18 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 0B98DDDD0B for ; Sat, 5 Sep 2009 11:38:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934500AbZIEBiI (ORCPT ); Fri, 4 Sep 2009 21:38:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934360AbZIEBiI (ORCPT ); Fri, 4 Sep 2009 21:38:08 -0400 Received: from g4t0014.houston.hp.com ([15.201.24.17]:40956 "EHLO g4t0014.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934291AbZIEBiH (ORCPT ); Fri, 4 Sep 2009 21:38:07 -0400 Received: from g1t0038.austin.hp.com (g1t0038.austin.hp.com [16.236.32.44]) by g4t0014.houston.hp.com (Postfix) with ESMTP id 7E2172406C; Sat, 5 Sep 2009 01:38:10 +0000 (UTC) Received: from [16.1.1.100] (squirrel.fc.hp.com [15.11.146.57]) by g1t0038.austin.hp.com (Postfix) with ESMTP id 87878300A2; Sat, 5 Sep 2009 01:38:09 +0000 (UTC) Message-ID: <4AA1C0FF.4030109@hp.com> Date: Fri, 04 Sep 2009 21:38:07 -0400 From: Brian Haley Organization: Open Source and Linux Organization User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: david Miller CC: "netdev@vger.kernel.org" , YOSHIFUJI Hideaki Subject: [PATCH] ipv6: Add IFA_F_DADFAILED flag Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org [Note: if this is accepted I'll send out a patch for iproute, if you'd prefer to not use the last ifa_flag I'll send a much larger patch that does this differently :) ] Add IFA_F_DADFAILED flag to denote an IPv6 address that has failed Duplicate Address Detection, that way tools like /sbin/ip can be more informative. 3: eth0: mtu 1500 qlen 1000 inet6 2001:db8::1/64 scope global tentative dadfailed valid_lft forever preferred_lft forever Signed-off-by: Brian Haley --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h index a60c821..fd97404 100644 --- a/include/linux/if_addr.h +++ b/include/linux/if_addr.h @@ -41,6 +41,7 @@ enum #define IFA_F_NODAD 0x02 #define IFA_F_OPTIMISTIC 0x04 +#define IFA_F_DADFAILED 0x08 #define IFA_F_HOMEADDRESS 0x10 #define IFA_F_DEPRECATED 0x20 #define IFA_F_TENTATIVE 0x40 diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 43b3c9f..6532966 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1376,7 +1376,7 @@ static void addrconf_dad_stop(struct inet6_ifaddr *ifp) if (ifp->flags&IFA_F_PERMANENT) { spin_lock_bh(&ifp->lock); addrconf_del_timer(ifp); - ifp->flags |= IFA_F_TENTATIVE; + ifp->flags |= IFA_F_DADFAILED; spin_unlock_bh(&ifp->lock); in6_ifa_put(ifp); #ifdef CONFIG_IPV6_PRIVACY