From owner-freebsd-net@FreeBSD.ORG Tue Oct 6 15:40:04 2009 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CE51106566B for ; Tue, 6 Oct 2009 15:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 119218FC0A for ; Tue, 6 Oct 2009 15:40:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n96Fe3iI014872 for ; Tue, 6 Oct 2009 15:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n96Fe3x0014870; Tue, 6 Oct 2009 15:40:03 GMT (envelope-from gnats) Date: Tue, 6 Oct 2009 15:40:03 GMT Message-Id: <200910061540.n96Fe3x0014870@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Stef Walter Cc: Subject: Re: kern/137164: [netinet] [patch] assert panic imo_match_source() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stef Walter List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 15:40:04 -0000 The following reply was made to PR kern/137164; it has been noted by GNATS. From: Stef Walter To: bug-followup@FreeBSD.org, jhanna@pangolin-systems.com, Bruce Simpson Cc: Subject: Re: kern/137164: [netinet] [patch] assert panic imo_match_source() Date: Tue, 06 Oct 2009 10:37:31 -0500 This is a multi-part message in MIME format. --------------090401010308070005060707 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks for working on getting all these multicast fixes in. Much appreciated! Just one more thing, previous to 7.x FreeBSD would return EADDRINUSE in the case of a double IP_ADD_MEMBERSHIP. Software like quagga uses this error code to detect this condition. As patched (and MFC'd in 7.x and 8.x) EINVAL is returned instead and this confuses such software. Currently the multicast code does not remove memberships from its internal structures when an interface goes down. It's hard for userland to reliably track the condition of a multicast membership that didn't go away due to an interface going down. So software like quagga uses EADDRINUSE to track the condition. Obviously, as you Bruce mentioned, an better solution needs to be found eventually WRT to 'dynamic' interfaces and the multicast code. But for now would the attached patch be acceptable? It would prevent regressions from FreeBSD 6.x. Thanks for considering, Stef --------------090401010308070005060707 Content-Type: text/x-diff; name="freebsd-mcast-eaddrinuse.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="freebsd-mcast-eaddrinuse.patch" --- sys/netinet/in_mcast.c.orig 2009-09-30 16:43:35.000000000 +0000 +++ sys/netinet/in_mcast.c 2009-09-30 17:04:59.000000000 +0000 @@ -2010,5 +2010,5 @@ * is atomic with allocation of a membership. */ - error = EINVAL; + error = EADDRINUSE; goto out_inp_locked; } --------------090401010308070005060707--