From owner-cvs-src-old@FreeBSD.ORG Thu Mar 11 17:57:05 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4068106564A for ; Thu, 11 Mar 2010 17:57:05 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 928C38FC22 for ; Thu, 11 Mar 2010 17:57:05 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BHv51L097304 for ; Thu, 11 Mar 2010 17:57:05 GMT (envelope-from qingli@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o2BHv5cA097303 for cvs-src-old@freebsd.org; Thu, 11 Mar 2010 17:57:05 GMT (envelope-from qingli@repoman.freebsd.org) Message-Id: <201003111757.o2BHv5cA097303@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to qingli@repoman.freebsd.org using -f From: Qing Li Date: Thu, 11 Mar 2010 17:56:46 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net if_tap.c route.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 17:57:05 -0000 qingli 2010-03-11 17:56:46 UTC FreeBSD src repository Modified files: sys/net if_tap.c route.h Log: SVN rev 205024 on 2010-03-11 17:56:46Z 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. MFC after: 3 days Revision Changes Path 1.83 +2 -0 src/sys/net/if_tap.c 1.89 +3 -1 src/sys/net/route.h