From owner-freebsd-current@FreeBSD.ORG Mon Jun 18 17:50:04 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6423016A469 for ; Mon, 18 Jun 2007 17:50:04 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 13FA013C447 for ; Mon, 18 Jun 2007 17:50:04 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 83F85132F; Mon, 18 Jun 2007 13:50:03 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 18 Jun 2007 13:50:03 -0400 X-Sasl-enc: +vNUgLaLexldqs4NwUigoAgJzbVdO39YRzR0qPY43hHZ 1182189003 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id EF9DD111FA; Mon, 18 Jun 2007 13:50:02 -0400 (EDT) Message-ID: <4676C5C2.9030900@incunabulum.net> Date: Mon, 18 Jun 2007 18:49:54 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Ian FREISLICH References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: Multicast problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 17:50:04 -0000 Ian FREISLICH wrote: > It looks like it just uses IP_ADD_MEMBERSHIP. HAVE_BSD_STRUCT_IP_MREQ_HACK > is defined. I really don't know anything about how it should be > doing this to say whether the above code is correct. > This is expected behaviour. The new code phases out the hack which this define refers to, which is to encode 24 bits of an interface index in 0.0.0.0/8 (first 8 bits set to zero). The reason why the hack was needed in the first place is because of how the BSD INADDR_TO_IFP() lookup works with regards to unnumbered and point-to-point interfaces, as described in UPDATING. The issue with joining groups on INADDR_ANY is separate from this -- it is related only insofaras code which still expects to abuse the RFC 1724 style behaviour (0.0.0.0/8) is going to end up with INADDR_TO_IFP returning NULL, and will hit the same path. I would expect Quagga to fail to add the group with EADDRNOTAVAIL. There have been attempts to fix this in NetBSD differently, by changing the lookup, however, I should point out that it still doesn't fix the issue with unnumbered interfaces: http://mail-index.netbsd.org/netbsd-bugs/1999/04/02/0001.html I didn't roll a patch for Quagga as it's not part of the base system. Making the required change shouldn't be difficult. It is probably easier for the purposes of Quagga to use the Linux-derived ip_mreqn extension to the IP_MULTICAST_IF ioctl for interface selection, as ospf should be using a locally-scoped address (224.0.0.5 falls under the local administrative scope 224.0.0.0/8) -- although the MCAST_JOIN_GROUP ioctl is the one to use if one needs to bind to an interface by index and be sure that it actually worked. The patch for Rhyolite routed demonstrates both techniques. It is available here: http://people.freebsd.org/~bms/dump/routed.rfc3678.diff Kind regards, BMS