diff options
author | 1997-07-28 19:31:47 +0000 | |
---|---|---|
committer | 1997-07-28 19:31:47 +0000 | |
commit | 98c2803388eee406a37323595af1c6e2dc09594b (patch) | |
tree | 0b0af8bf05b868a10d1124268a5a5b429164258e | |
parent | pretty (diff) | |
download | wireguard-openbsd-98c2803388eee406a37323595af1c6e2dc09594b.tar.xz wireguard-openbsd-98c2803388eee406a37323595af1c6e2dc09594b.zip |
Move configuration of loopback interface to before all other interfaces.
Allows the use of local caching-only nameserver with no "nameserver"
entry in /etc/resolv.conf to configure a route between the hostname
and loopback.
-rw-r--r-- | etc/netstart | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/etc/netstart b/etc/netstart index d70f8da4765..20a96742f48 100644 --- a/etc/netstart +++ b/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.23 1997/07/25 00:06:03 provos Exp $ +# $OpenBSD: netstart,v 1.24 1997/07/28 19:31:47 kstailey Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags routed_flags=-q @@ -64,8 +64,14 @@ else nat=NO fi +# set the address for the loopback interface +ifconfig lo0 inet localhost -# configure all of the interfaces which we know about. +# use loopback, not the wire +route add $hostname localhost +route add -net 127 127.0.0.1 -reject + +# configure all of the non-loopback interfaces which we know about. # do this by reading /etc/hostname.* files, where * is the name # of a given interface. # @@ -120,19 +126,12 @@ fi done ) -# set the address for the loopback interface -ifconfig lo0 inet localhost - # /etc/mygate, if it exists, contains the name of my gateway host # that name must be in /etc/hosts. if [ -f /etc/mygate ]; then route add default `cat /etc/mygate` fi -# use loopback, not the wire -route add $hostname localhost -route add -net 127 127.0.0.1 -reject - # default multicast route route add -net 224.0.0.0 -interface $hostname |