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

Nick Kritsky nkritsky at
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
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 31 17:30:06 UTC 2009
>Originator:     Nick Kritsky
>Release:        7.2-RELEASE
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
GRE interface will not work after reboot.
Following line were added to rc.conf:

ifconfig_gre3168="inet netmask tunnel 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.
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.
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;
    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. 


More information about the freebsd-bugs mailing list