conf/138407: gre(4) interface does not come up after reboot

Nick Kritsky nkritsky at mail.ru
Mon Aug 31 17:30:07 UTC 2009


>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 at 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:


More information about the freebsd-bugs mailing list