From owner-freebsd-net@FreeBSD.ORG Mon Mar 19 16:51:32 2007 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA1B616A400 for ; Mon, 19 Mar 2007 16:51:32 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by mx1.freebsd.org (Postfix) with ESMTP id A540E13C465 for ; Mon, 19 Mar 2007 16:51:32 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 6867E209089; Mon, 19 Mar 2007 12:51:30 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Mon, 19 Mar 2007 12:51:30 -0400 X-Sasl-enc: OkX56kx3dS23KsKYk7jbPbanRHpSnjJhgCjZUZGQH30N 1174323092 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 DED2123F73; Mon, 19 Mar 2007 12:51:31 -0400 (EDT) Message-ID: <45FEBF91.2000709@incunabulum.net> Date: Mon, 19 Mar 2007 16:51:29 +0000 From: Bruce M Simpson User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: Eugene Grosbein References: <45FE9E24.8010201@incunabulum.net> <20070319152837.GA3984@svzserv.kemerovo.su> In-Reply-To: <20070319152837.GA3984@svzserv.kemerovo.su> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: net@freebsd.org Subject: Re: Interface index hack in IP_ADD_MEMBERSHIP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2007 16:51:32 -0000 Eugene Grosbein wrote: > > I recall that routed and ripd used to utilize something similar > long time ago. I'm not sure if they have switched to another API. > You're right -- this would break routed on point-to-point interfaces. They didn't, unless it was updated at the upstream, i.e. rhyolite.com. This means that the RFC1724 hack can't be safely deprecated without breaking this use case, until routed is updated to use the RFC 3678 protocol-independent ASM API. Linux uses a slightly different technique to work-around this; ip_mreq is expanded to ip_mreqn internally, and the interface index is explicitly passed around in the kernel. The blocker in the FreeBSD case which prevents us simply adopting this is the source interface selection logic in ip_output(). Regards, BMS