From patchwork Thu Sep 10 19:14:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Haley X-Patchwork-Id: 33381 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 80CEFB7067 for ; Fri, 11 Sep 2009 05:14:34 +1000 (EST) Received: by ozlabs.org (Postfix) id 61D30DDD0C; Fri, 11 Sep 2009 05:14:34 +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 EF120DDD04 for ; Fri, 11 Sep 2009 05:14:33 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752976AbZIJTOX (ORCPT ); Thu, 10 Sep 2009 15:14:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752699AbZIJTOX (ORCPT ); Thu, 10 Sep 2009 15:14:23 -0400 Received: from g1t0029.austin.hp.com ([15.216.28.36]:44318 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752642AbZIJTOW (ORCPT ); Thu, 10 Sep 2009 15:14:22 -0400 Received: from g5t0029.atlanta.hp.com (g5t0029.atlanta.hp.com [16.228.8.141]) by g1t0029.austin.hp.com (Postfix) with ESMTP id C8903382B1; Thu, 10 Sep 2009 19:14:25 +0000 (UTC) Received: from [16.1.1.100] (squirrel.fc.hp.com [15.11.146.57]) by g5t0029.atlanta.hp.com (Postfix) with ESMTP id 7B1191026E; Thu, 10 Sep 2009 19:14:24 +0000 (UTC) Message-ID: <4AA9500E.8020309@hp.com> Date: Thu, 10 Sep 2009 15:14:22 -0400 From: Brian Haley Organization: Open Source and Linux Organization User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Jens Rosenboom CC: david Miller , "netdev@vger.kernel.org" , YOSHIFUJI Hideaki Subject: Re: [PATCH] ipv6: Add IFA_F_DADFAILED flag References: <4AA1C0FF.4030109@hp.com> <1252418247.5827.8.camel@fnki-nb00130> <4AA675D4.8030406@hp.com> <1252424623.5827.14.camel@fnki-nb00130> <4AA84B3C.4000401@hp.com> <1252599080.5980.3.camel@fnki-nb00130> In-Reply-To: <1252599080.5980.3.camel@fnki-nb00130> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Jens, Jens Rosenboom wrote: >> Ok, how does this look? I changed it to set the tentative flag as it did >> before, plus clear the dad_failed flag if the device got restarted, >> triggering DAD to happen again for any tentative address, that was an >> oversight on my part. > > Looks fine to me so far, can you also send the patch for userspace? That > would making testing this a bit easier. ;-) Iproute2 patch below, I'll re-post both once you have a chance to test. >> I'd still like to know if using this last ifa_flag is going to be an issue, >> I actually finished a similar patch that uses a new IFA_ADDRFLAGS structure >> to pass in/out this additional info. > > IMHO you should stick to this version, if any future feature needs > another bit, it may happen also to need two of them and so will need a > new structure then anyway, but why not keep it simple for now? I'll leave it for now, I might just post as an RFC to get some feedback on it. Thanks, -Brian --- 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/ip/ipaddress.c b/ip/ipaddress.c index 267ecb3..97c7a8b 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -508,6 +508,10 @@ int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n, fprintf(fp, "dynamic "); } else ifa->ifa_flags &= ~IFA_F_PERMANENT; + if (ifa->ifa_flags&IFA_F_DADFAILED) { + ifa->ifa_flags &= ~IFA_F_DADFAILED; + fprintf(fp, "dadfailed "); + } if (ifa->ifa_flags) fprintf(fp, "flags %02x ", ifa->ifa_flags); if (rta_tb[IFA_LABEL])