From owner-freebsd-net@FreeBSD.ORG Fri Mar 1 16:24:03 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EAFC65A1; Fri, 1 Mar 2013 16:24:03 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-oa0-f45.google.com (mail-oa0-f45.google.com [209.85.219.45]) by mx1.freebsd.org (Postfix) with ESMTP id AB3E3849; Fri, 1 Mar 2013 16:24:03 +0000 (UTC) Received: by mail-oa0-f45.google.com with SMTP id o6so6009234oag.18 for ; Fri, 01 Mar 2013 08:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=LuhCD7HqxDNqarnyXtQhqbXV4pJgB8+7YsDlQ3tRI4g=; b=yMK210W3SWJalcIT4mWlS1nTeVt51WAmGpXKzQ1cPBtf3Jf3nRZN7YYgW9iWVhzCPn vUW8RWdhSIJf8OqI3NETlu6tgWUH+fLRD/BG/b7J6H/20w97hDP4jnHzQxXaXA4qz0Cn xPXtFZyAAQNWUNGr3v/Ztto+uL/EmotcWnuwO7oz+QfYlu5LK7Izw0qsZQ7g20QnW/JA SEZrM1gvWPwF+SEdusJe4JSNDrLhe0MMk+B9WHH3SjC68Cb/L92QcIJG8AewinF2HEbi pSHM4lXwZ/UNicQp9h2GRh/O2qtcilwq+8Utf3vXMWggmQFU1KbyNTfGhdEUR5jF0NZY ENeA== MIME-Version: 1.0 X-Received: by 10.60.8.40 with SMTP id o8mr8862380oea.112.1362155037557; Fri, 01 Mar 2013 08:23:57 -0800 (PST) Sender: carpeddiem@gmail.com Received: by 10.60.150.239 with HTTP; Fri, 1 Mar 2013 08:23:57 -0800 (PST) In-Reply-To: <5130CF14.4090606@FreeBSD.org> References: <20130228191035.GA36576@sandvine.com> <5130CF14.4090606@FreeBSD.org> Date: Fri, 1 Mar 2013 11:23:57 -0500 X-Google-Sender-Auth: uwbSLfhQNwp3nv9c-8R-ptsP-cg Message-ID: Subject: Re: [PATCH] Handle PACKET_TAG_IPFORWARD and TIMEWAIT state From: Ed Maste To: "Andrey V. Elsukov" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 01 Mar 2013 16:24:04 -0000 On 1 March 2013 10:53, Andrey V. Elsukov wrote: > On 01.03.2013 01:06, Ed Maste wrote: >> On 28 February 2013 14:10, Ed Maste wrote: >>> The attached patch keeps the fwd_tag >>> around until finished with pcb lookup. >> >> There's a small bug in that patch - a corrected version, which handles >> a NULL return from m_tag_find, can be found at: >> http://people.freebsd.org/~emaste/patches/fwd_tag_findpcb.diff > > Hi Ed, > > it seems this problem was there before my breakage. Yes, I had a chat with glebius@ about it, and it looks like this problem has existed for years. > Also, it think that m_tag_unlink is redundant here, because you clear > the M_IP_NEXTHOP/M_IP6_NEXTHOP flag. I split the old m_tag_delete into m_tag_unlink after finding the tag, and m_tag_free on the exit paths from the pcb lookup. I could leave it attached to the mbuf and m_tag_delete it in the cases I modified, although I don't think it makes much difference.