Browse Source

Delay creation of tun(4) interfaces until the underlying interface and

routes are available.  This fixes usage for some OpenVPN users that start
it from hostname.tun*.
Tested by Johan Huldtgren.  ok sthen@, johan@.
OPENBSD_4_7
jdixon 15 years ago
parent
commit
be9938a1c6
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      src/etc/netstart

+ 6
- 5
src/etc/netstart View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: netstart,v 1.124 2008/11/25 12:11:44 markus Exp $
# $OpenBSD: netstart,v 1.125 2009/07/10 19:08:08 jdixon Exp $
# Strip comments (and leading/trailing whitespace if IFS is set) # Strip comments (and leading/trailing whitespace if IFS is set)
# from a file and spew to stdout # from a file and spew to stdout
@ -301,7 +301,7 @@ fi
# Configure all the non-loopback interfaces which we know about, but # Configure all the non-loopback interfaces which we know about, but
# do not start interfaces which must be delayed. # do not start interfaces which must be delayed.
# Refer to hostname.if(5) and bridgename.if(5) # Refer to hostname.if(5) and bridgename.if(5)
ifmstart "" "trunk vlan carp gif gre pfsync pppoe"
ifmstart "" "trunk vlan carp gif gre pfsync pppoe tun"
# The trunk interfaces need to come up first in this list. # The trunk interfaces need to come up first in this list.
# The vlan interfaces need to come up after trunk. # The vlan interfaces need to come up after trunk.
@ -372,9 +372,10 @@ EOF
esac esac
# Configure PPPoE, GIF, GRE interfaces, delayed because they require routes
# to be set. PPPoE must be first, as GIF and GRE may depend on it.
ifmstart "pppoe gif gre"
# Configure PPPoE, GIF, GRE and TUN interfaces, delayed because they require
# routes to be set. TUN might depend on PPPoE, and GIF or GRE may depend on
# either of them.
ifmstart "pppoe tun gif gre"
# reject 127/8 other than 127.0.0.1 # reject 127/8 other than 127.0.0.1
route -qn add -net 127 127.0.0.1 -reject > /dev/null route -qn add -net 127 127.0.0.1 -reject > /dev/null


Loading…
Cancel
Save