From owner-svn-src-stable-8@FreeBSD.ORG Fri Jun 4 10:11:31 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23C40106566B; Fri, 4 Jun 2010 10:11:31 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id EF8848FC13; Fri, 4 Jun 2010 10:11:30 +0000 (UTC) Received: from [192.168.2.105] (host86-162-158-86.range86-162.btcentralplus.com [86.162.158.86]) by cyrus.watson.org (Postfix) with ESMTPSA id A237646B7E; Fri, 4 Jun 2010 06:11:29 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=iso-8859-1 From: "Robert N. M. Watson" In-Reply-To: Date: Fri, 4 Jun 2010 11:11:27 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <0925CEED-A973-4820-A8DA-E5EDD44CCBDF@freebsd.org> References: <201006030855.o538tjke024438@svn.freebsd.org> To: =?iso-8859-1?Q?Ermal_Lu=E7i?= X-Mailer: Apple Mail (2.1078) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r208766 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2010 10:11:31 -0000 On 3 Jun 2010, at 14:09, Ermal Lu=E7i wrote: > Would it make sense to remove even passing the interface name up and > actually send the > interface index? >=20 > That is what we are doing at pfSense and it works quite ok. I see one important argument for doing this: - Looking up an interface by number instead of by name has a number of = advantages. - User programs that already reason about network interfaces by ifindex = don't have to take an indirection. However, it has two important downsides: - It changes an existing API that a moderate number of applications = depend on. - Applications that reason about ifnet names now have to take an = indirection, which might well mean monitoring routing sockets for = interface renames/additions/removals, additional sysctls, etc. As such, I'm not sure the benefits of replacing the current behavior = with the proposed new behavior is worth the cost. An alternative = approach might be to add a socket option to set the disposition of the = divert socket, defaulting to current behavior but optionally switching = to a different interpretation of the sockaddr passed in (i.e., use the = ifindex instead when the option is set). Could you say a bit more about = why you found this change advantageous in your environment, and whether = the socket option approach would be problematic there? Robert=