From owner-freebsd-net@FreeBSD.ORG Tue Jun 1 22:38:14 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A09591065679; Tue, 1 Jun 2010 22:38:14 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4A3488FC24; Tue, 1 Jun 2010 22:38:13 +0000 (UTC) Received: by vws10 with SMTP id 10so3980128vws.13 for ; Tue, 01 Jun 2010 15:38:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.59.74 with SMTP id k10mr5024105vch.119.1275430016739; Tue, 01 Jun 2010 15:06:56 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.220.165.74 with HTTP; Tue, 1 Jun 2010 15:06:56 -0700 (PDT) Date: Wed, 2 Jun 2010 10:06:56 +1200 X-Google-Sender-Auth: IHuSMOzdb0Bfut5JJ-wdgphBLPg Message-ID: From: Andrew Thompson To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: qingli@freebsd.org Subject: Link state changes 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: Tue, 01 Jun 2010 22:38:14 -0000 > Revision 205024 - (annotate) > Thu Mar 11 17:56:46 2010 UTC (2 months, 3 weeks ago) by qingli > > The if_tap interface is of IFT_ETHERNET type, but it > does not set or update the if_link_state variable. > As such RT_LINK_IS_UP() fails for the if_tap interface. > > Also, the RT_LINK_IS_UP() needs to bypass all loopback > interfaces because loopback interfaces are considered > up logically as long as the system is running. > > This patch fixes the above issues by setting and updating > the if_link_state variable when the tap interface is > opened or closed respectively. Similary approach is > already done in the if_tun device. This is also a problem for bridge(4) and possibly ef(4), edesc(4) and epair(4). Should the same change be applied to them? Andrew