From owner-freebsd-stable@FreeBSD.ORG Mon Jun 18 07:37:34 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 847A7106566B for ; Mon, 18 Jun 2012 07:37:34 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id DF1998FC18 for ; Mon, 18 Jun 2012 07:37:33 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id q5I7bRp3039218; Mon, 18 Jun 2012 14:37:27 +0700 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <4FDEDAB7.7040802@rdtc.ru> Date: Mon, 18 Jun 2012 14:37:27 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: Jason Hellenthal References: <20120618024713.GB82047@DataIX.net> In-Reply-To: <20120618024713.GB82047@DataIX.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: stable@freebsd.org Subject: Re: FreeBSD 8.3-STABLE #0 r237184 if_tun auto-up upon create. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 07:37:34 -0000 18.06.2012 09:47, Jason Hellenthal пишет: > > Hoping someone here might be able to clue me in on what I am seeing. > > FreeBSD 8.3-STABLE #0 r237184 > > When creating a if_tun(4) device... > ifconfig tun0 create > > With these line in rc.conf(5) > cloned_interfaces="tun0" > ifconfig_tun0="metric 100 down" > > And sysctl net.link.tun.devfs_cloning=0 > > The resulting tun0 device results in state... > tun0: flags=8011 metric 100 mtu 1500 > > > After removing the ifconfig_tun0= and running ifconfig create... > tun0: flags=8010 metric 0 mtu 1500 > > > Why would the device enter a UP/DOWN state if there is no addressing > information being fed to it ? and especially with a directive of "down" > ? That's because the word "up" is automatically added by system rc-scripts for ifconfig_XXX lines, so real ifconfig statement in your case is: ifconfig tun0 metric 100 down up Eugene Grosbein