Date: Sat, 14 Apr 2007 06:52:04 GMT From: "Eugene M. Zheganin"<emz@norma.perm.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: conf/111557: link1 flag doesn't work as intended when specified in startup scripts Message-ID: <200704140652.l3E6q42N058605@www.freebsd.org> Resent-Message-ID: <200704140700.l3E70AE6067944@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704140652.l3E6q42N058605>
