From owner-freebsd-net@FreeBSD.ORG Wed Oct 1 04:07:30 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 B2C87427 for ; Wed, 1 Oct 2014 04:07:30 +0000 (UTC) Received: from forward4p.cmail.yandex.net (forward4p.cmail.yandex.net [IPv6:2a02:6b8:0:1465::14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD5A365 for ; Wed, 1 Oct 2014 04:07:30 +0000 (UTC) Received: from smtp16.mail.yandex.net (smtp16.mail.yandex.net [95.108.252.16]) by forward4p.cmail.yandex.net (Yandex) with ESMTP id BC03713C5; Wed, 1 Oct 2014 08:07:23 +0400 (MSK) Received: from smtp16.mail.yandex.net (localhost [127.0.0.1]) by smtp16.mail.yandex.net (Yandex) with ESMTP id 816E16A0B27; Wed, 1 Oct 2014 08:07:23 +0400 (MSK) Received: from 84.201.165.11-vpn.dhcp.yndx.net (84.201.165.11-vpn.dhcp.yndx.net [84.201.165.11]) by smtp16.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 47IFGsWlof-7M5mnGGj; Wed, 1 Oct 2014 08:07:23 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 9a1cdb24-f338-42ba-9d52-c1369c5910ba DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1412136443; bh=MccTSkLwrrtUrFM9+Bk6b6pDq4uyrQYgp+zjyWn8Iro=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: References:In-Reply-To:X-Enigmail-Version:Content-Type: Content-Transfer-Encoding; b=GVHHcb8KxeZ+EKwppcOc5lBbRE+Rdxxg1vA+IMC6dfUNpysy7oBS0NgByd1ZUJIme c+GJccxkJurDBUf0Sa2Xait1B0bunIJdQG1sCm2siWOkRxoF+iGhtb8JBNF/K05kOk 5ppqBK4tafgXWCIks6Y9gLE8/+jauXs3a5mH/Ktw= Authentication-Results: smtp16.mail.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <542B7D74.4090302@yandex.ru> Date: Wed, 01 Oct 2014 08:05:08 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Vedant Mathur , freebsd-net@freebsd.org Subject: Re: Addressing refcount issues in ip6_setdstifaddr and ip6_getdstifaddr routines. References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Wed, 01 Oct 2014 04:07:30 -0000 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