From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 31 17:30:07 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A57E110656A3 for ; Mon, 31 Aug 2009 17:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 68B7D8FC2A for ; Mon, 31 Aug 2009 17:30:07 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VHU7bs056595 for ; Mon, 31 Aug 2009 17:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7VHU7EV056592; Mon, 31 Aug 2009 17:30:07 GMT (envelope-from gnats) Resent-Date: Mon, 31 Aug 2009 17:30:07 GMT Resent-Message-Id: <200908311730.n7VHU7EV056592@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nick Kritsky Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 739871065679 for ; Mon, 31 Aug 2009 17:28:04 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 629DC8FC1C for ; Mon, 31 Aug 2009 17:28:04 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VHS3F7046949 for ; Mon, 31 Aug 2009 17:28:03 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n7VHS3WD046948; Mon, 31 Aug 2009 17:28:03 GMT (envelope-from nobody) Message-Id: <200908311728.n7VHS3WD046948@www.freebsd.org> Date: Mon, 31 Aug 2009 17:28:03 GMT From: Nick Kritsky To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: conf/138407: gre(4) interface does not come up after reboot X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 17:30:07 -0000 >Number: 138407 >Category: conf >Synopsis: gre(4) interface does not come up after reboot >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 31 17:30:06 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Nick Kritsky >Release: 7.2-RELEASE >Organization: >Environment: FreeBSD suzmisgw01.internal.corp 7.2-RELEASE FreeBSD 7.2-RELEASE #1: Thu Jul 2 23:20:47 CST 2009 root@ESSUZNMS01.TAIHOOTECH.COM:/usr/obj/usr/src/sys/VPN i386 >Description: GRE interface will not work after reboot. Following line were added to rc.conf: cloned_interfaces="gre3168" ifconfig_gre3168="inet 192.168.249.170 192.168.249.169 netmask 255.255.255.254 tunnel 10.166.2.40 195.62.48.25 mtu 1400" When running "ifconfig gre3168" I noticed that interface is missing "RUNNING" flag. If I issue "ifconfig gre3168 up" the interface becomes operational, and "RUNNING" flag is added to "ifconfig gre3168" output. >How-To-Repeat: 1. Create records about GRE interface in rc.conf. 2. Reboot the server 3. try ping rhe remote side of GRE tunnel. You should get "network is down" error. >Fix: Possible reason for this lies in /usr/src/sys/net/if_gre.c, line 633: if (gre_compute_route(sc) == 0) ifp->if_drv_flags |= IFF_DRV_RUNNING; else ifp->if_drv_flags &= ~IFF_DRV_RUNNING; If the system did not install default route before the gre interface initialization, setting up tunnel properties will not trigger RUNNING flag on interface. My knowledge of 7.x kernel is not enough to decide if this check is safe to comment out. My quick fix was just adding "ifconfig gre3168 up" in rc.local. >Release-Note: >Audit-Trail: >Unformatted: