Bug 164475 - [gre] gre misses RUNNING flag after a reboot
Summary: [gre] gre misses RUNNING flag after a reboot
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Andrey V. Elsukov
URL:
Keywords:
: 138407 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-25 10:20 UTC by Eugene M. Zheganin
Modified: 2018-03-13 19:19 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene M. Zheganin 2012-01-25 10:20:10 UTC
gre misses RUNNING flag after a reboot and thus cannot function. I have to 'up' it manually.

Fix: 

Place this script in /usr/local/etc/rc.d/

#!/bin/sh                                        
#

# PROVIDE: fixgre
# REQUIRE: LOGIN NETWORKING

. /etc/rc.subr                                      

name="fixgre"
rcvar=`set_rcvar`

start_cmd="start_cmd"

start_cmd () {
    for i in `ifconfig | grep gre | awk -F: '{print $1}'`
    do
        ifconfig $i up
    done
}                                        
                                                                                                                        
load_rc_config $name                         
run_rc_command "$1"
How-To-Repeat: Create a gre interface and reboot.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-01-26 02:23:58 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 emz 2012-08-30 10:30:04 UTC
Guys, it's still there.

FreeBSD alix-panicbox 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #2: Mon Jul 
23 03:02:45 YEKT 2012 
emz@zombie.hq.norma.perm.ru:/usr/obj/nanobsd.alix/usr/src/sys/ALIX i386
Comment 3 olivier 2013-10-21 18:57:51 UTC
Hi,
still the same problem on 9.2-RELEASE.

Regards,

Olivier
Comment 4 emz 2014-04-04 13:27:29 UTC
Still reproducible on 10.x, including RELEASE and STABLE.
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-11-07 19:14:18 UTC
A commit references this bug:

Author: ae
Date: Fri Nov  7 19:13:22 UTC 2014
New revision: 274246
URL: https://svnweb.freebsd.org/changeset/base/274246

Log:
  Overhaul if_gre(4).

  Split it into two modules: if_gre(4) for GRE encapsulation and
  if_me(4) for minimal encapsulation within IP.

  gre(4) changes:
  * convert to if_transmit;
  * rework locking: protect access to softc with rmlock,
    protect from concurrent ioctls with sx lock;
  * correct interface accounting for outgoing datagramms (count only payload size);
  * implement generic support for using IPv6 as delivery header;
  * make implementation conform to the RFC 2784 and partially to RFC 2890;
  * add support for GRE checksums - calculate for outgoing datagramms and check
    for inconming datagramms;
  * add support for sending sequence number in GRE header;
  * remove support of cached routes. This fixes problem, when gre(4) doesn't
    work at system startup. But this also removes support for having tunnels with
    the same addresses for inner and outer header.
  * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD.
    Use our standard ioctls for tunnels.

  me(4):
  * implementation conform to RFC 2004;
  * use if_transmit;
  * use the same locking model as gre(4);

  PR:		164475
  Differential Revision:	D1023
  No objections from:	net@
  Relnotes:	yes
  Sponsored by:	Yandex LLC

Changes:
  head/sbin/ifconfig/ifgre.c
  head/share/man/man4/Makefile
  head/share/man/man4/gre.4
  head/share/man/man4/me.4
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/modules/Makefile
  head/sys/modules/if_gre/Makefile
  head/sys/modules/if_me/
  head/sys/modules/if_me/Makefile
  head/sys/net/if_gre.c
  head/sys/net/if_gre.h
  head/sys/net/if_me.c
  head/sys/netinet/ip_gre.c
  head/sys/netinet/ip_gre.h
  head/sys/netinet6/in6_proto.c
  head/sys/netinet6/ip6_gre.c
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-06-06 12:45:37 UTC
A commit references this bug:

Author: ae
Date: Sat Jun  6 12:44:46 UTC 2015
New revision: 284066
URL: https://svnweb.freebsd.org/changeset/base/284066

Log:
  MFC r274246:
    Overhaul if_gre(4).

    Split it into two modules: if_gre(4) for GRE encapsulation and
    if_me(4) for minimal encapsulation within IP.

    gre(4) changes:
    * convert to if_transmit;
    * rework locking: protect access to softc with rmlock,
      protect from concurrent ioctls with sx lock;
    * correct interface accounting for outgoing datagramms (count only payload size);
    * implement generic support for using IPv6 as delivery header;
    * make implementation conform to the RFC 2784 and partially to RFC 2890;
    * add support for GRE checksums - calculate for outgoing datagramms and check
      for inconming datagramms;
    * add support for sending sequence number in GRE header;
    * remove support of cached routes. This fixes problem, when gre(4) doesn't
      work at system startup. But this also removes support for having tunnels with
      the same addresses for inner and outer header.
    * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD.
      Use our standard ioctls for tunnels.

    me(4):
    * implementation conform to RFC 2004;
    * use if_transmit;
    * use the same locking model as gre(4);

    PR:		164475

  MFC r274289 (by bz):
    gcc requires variables to be initialised in two places.  One of them
    is correctly  used only under the same conditional though.

    For module builds properly check if the kernel supports INET or INET6,
    as otherwise various mips kernels without IPv6 support would fail to build.

  MFC r274964:
    Add ip_gre.h to ObsoleteFiles.inc.

Changes:
_U  stable/10/
  stable/10/ObsoleteFiles.inc
  stable/10/sbin/ifconfig/ifgre.c
  stable/10/share/man/man4/Makefile
  stable/10/share/man/man4/gre.4
  stable/10/share/man/man4/me.4
  stable/10/sys/conf/NOTES
  stable/10/sys/conf/files
_U  stable/10/sys/gnu/dts/
  stable/10/sys/modules/Makefile
  stable/10/sys/modules/if_gif/Makefile
  stable/10/sys/modules/if_gre/Makefile
  stable/10/sys/modules/if_me/
  stable/10/sys/net/if_gre.c
  stable/10/sys/net/if_gre.h
  stable/10/sys/net/if_me.c
  stable/10/sys/netinet/ip_gre.c
  stable/10/sys/netinet/ip_gre.h
  stable/10/sys/netinet6/in6_proto.c
  stable/10/sys/netinet6/ip6_gre.c
Comment 7 Andrey V. Elsukov freebsd_committer freebsd_triage 2015-06-06 13:40:48 UTC
Fixed in head/ and stable/10.
Comment 8 Andrey V. Elsukov freebsd_committer freebsd_triage 2015-09-17 12:44:39 UTC
*** Bug 138407 has been marked as a duplicate of this bug. ***