From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 14 07:00:10 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC33816A403 for ; Sat, 14 Apr 2007 07:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 91FEC13C469 for ; Sat, 14 Apr 2007 07:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3E70AMT067945 for ; Sat, 14 Apr 2007 07:00:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3E70AE6067944; Sat, 14 Apr 2007 07:00:10 GMT (envelope-from gnats) Resent-Date: Sat, 14 Apr 2007 07:00:10 GMT Resent-Message-Id: <200704140700.l3E70AE6067944@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, "Eugene M. Zheganin" Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8996416A482 for ; Sat, 14 Apr 2007 06:57:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 7EE9213C480 for ; Sat, 14 Apr 2007 06:57:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l3E6v629058982 for ; Sat, 14 Apr 2007 06:57:06 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l3E6q42N058605; Sat, 14 Apr 2007 06:52:04 GMT (envelope-from nobody) Message-Id: <200704140652.l3E6q42N058605@www.freebsd.org> Date: Sat, 14 Apr 2007 06:52:04 GMT From: "Eugene M. Zheganin" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: conf/111557: link1 flag doesn't work as intended when specified in startup scripts 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: Sat, 14 Apr 2007 07:00:10 -0000 >Number: 111557 >Category: conf >Synopsis: link1 flag doesn't work as intended when specified in startup scripts >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 14 07:00:09 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Eugene M. Zheganin >Release: 6.2-RELEASE >Organization: Norma JSC. >Environment: FreeBSD bsd.niiums.perm.ru 6.2-RELEASE FreeBSD 6.2-RELEASE #2: Thu Jan 25 16:13:06 YEKT 2007 emz@bsd.niiums.perm.ru: /usr/obj/usr/src/sys/NIIUMS i386 >Description: 'link1' flag doesn't work as intended when configured for gre tunnel using main system config files: - when configured via ifconfig_gre0="" with all appropriate parameters the interface does appear with 'LINK1' flag, but requires an additional 'ifconfig gre link1' command for the tunnel to start working; - when configured via 'start_if.gre0' script with all additional parameters, for example ===Cut=== #!/bin/sh /sbin/ifconfig gre0 192.168.1.1 192.168.1.2 netmask 255.255.255.255 10.10.10.1 10.10.10.5 mtu 1480 # even when sleep 10 sleep 10 /sbin/ifconfig gre0 link1 ===Cut== the system still requires 'ifconfig gre0 link1' for the tunnel to start working; >How-To-Repeat: Create a gre tunnel with link1 set in configuration files; in rc.conf or even in start_if.gre0. Reboot the machine. Try to ping remote. >Fix: echo gre_enable="YES" >> /etc/rc.conf echo gre_flags="greX link1" >> /etc/rc.conf (according to your configuration) and place the following script to /usr/local/etc/rc.d/: #!/bin/sh # # # gre startup script by drookie, 14/04/2007 12:38 # to avoid link1 bug when it is configured in earlier scripts :/ # # PROVIDE: gre # REQUIRE: LOGIN NETWORKING # # name=gre command=/sbin/ifconfig gre_enable=${gre_enable:-"NO"} . /etc/rc.subr rcvar=`set_rcvar` load_rc_config ${name} run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: