From owner-freebsd-net@FreeBSD.ORG Fri Oct 3 14:04:00 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27DD3A2A for ; Fri, 3 Oct 2014 14:04:00 +0000 (UTC) Received: from na3sys009aog129.obsmtp.com (na3sys009aog129.obsmtp.com [74.125.149.142]) by mx1.freebsd.org (Postfix) with SMTP id CFA9310E for ; Fri, 3 Oct 2014 14:03:59 +0000 (UTC) Received: from mail-ig0-f179.google.com ([209.85.213.179]) (using TLSv1) by na3sys009aob129.postini.com ([74.125.148.12]) with SMTP ID DSNKVC6sxDcXMgbDA+4sf4eWNkMO5gvPmya3@postini.com; Fri, 03 Oct 2014 07:03:59 PDT Received: by mail-ig0-f179.google.com with SMTP id h18so2363723igc.6 for ; Fri, 03 Oct 2014 07:03:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=TkeBzcebgddXpe8E08zoxwcV59xJWbSkEQvvRpLI094=; b=cdnbviSuyixa3bKU3h+sY6h1husKJoXyw+ix9o8Cx1QdhqKTJW1yJA8VTTb+awgIzL eb9wkc9LLhNIS4VSkNTkbBqchHxk8CCUIXe6uH8FArTJB55i0u3mQfStneS+3qclVzmw qDkgWdfTuS6MBoi2pK8LJiP7ZfCvg/bRKYQaMCTcgr790lpSK28bEshaKvxb8e1BgdbL Lt8NDugCYHDVVxFembH3CFjOtyJLLZckOeOJhgUMJGAldcdT6opJBqqfEZwU0RnzzK8+ T7QpTX8A2omaloX7SYFDVzjpVB48Z5JQ2i+Zuc2kcYme9/suDC9+LHjC1aDWBRN3OFR6 zeiA== X-Gm-Message-State: ALoCoQltUW+3RQAH5yQl+9lODY5aWsQn68y5dH943JDJ7vkcnOr16Ule/zDOYh8TydIoY4zwqLO1Hoc5BsZeQvis7jYfdqXbvuvED2uRP8FPqKvBgyYlp+wQmaIJYiNHQgPCcfzCrq/kct0Qkbj9e8VdBKPl3cQN3Q== X-Received: by 10.50.152.35 with SMTP id uv3mr14513100igb.46.1412345027827; Fri, 03 Oct 2014 07:03:47 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.152.35 with SMTP id uv3mr14513051igb.46.1412345027472; Fri, 03 Oct 2014 07:03:47 -0700 (PDT) Received: by 10.43.61.201 with HTTP; Fri, 3 Oct 2014 07:03:47 -0700 (PDT) In-Reply-To: <542B7D74.4090302@yandex.ru> References: <542B7D74.4090302@yandex.ru> Date: Fri, 3 Oct 2014 10:03:47 -0400 Message-ID: Subject: Re: Addressing refcount issues in ip6_setdstifaddr and ip6_getdstifaddr routines. From: Vedant Mathur To: "Andrey V. Elsukov" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 14:04:00 -0000 Andrey, Not a bad option. I saw you deleted the ip6_findaux routine which is used in route6_input. You have a ifdef around it. Whats that for? -Vedant On Wed, Oct 1, 2014 at 12:05 AM, Andrey V. Elsukov wrote: > On 30.09.2014 19:24, Vedant Mathur wrote: > > *Solution 2:* > > > > In ip6_setdstifaddr() routine we can access the struct ifa using > > ia6->ia_ifa and retrieve the IP address from the ifa and then push it > > into the m_tag instead of the struct in6_ifaddr pointer. Then we will > > not require a refcnt increment and in the ip6_getdstifaddr() we can > > use the ifa_withifaddr() routines to retrieve the ia by basically > > looping through the list of ifaddrs. > > > > Hi, > > *Solution 3:* > > Remove this code :) > What you think about this? > https://svnweb.freebsd.org/base?view=revision&revision=256673 > > -- > WBR, Andrey V. Elsukov >