diff options
author | 2018-02-18 00:43:16 +0000 | |
---|---|---|
committer | 2018-02-18 00:43:16 +0000 | |
commit | 486fd1b5bbecd19f816bb9e86c60099a60c5b944 (patch) | |
tree | 7a63c99ca84d6b57af32dda271c00403d31f0eee | |
parent | In bio.h rev. 1.31 2018/02/17 13:57:14, tb@ provided new functions (diff) | |
download | wireguard-openbsd-486fd1b5bbecd19f816bb9e86c60099a60c5b944.tar.xz wireguard-openbsd-486fd1b5bbecd19f816bb9e86c60099a60c5b944.zip |
Create interfaces before processing the hostname.if file in ifstart().
This ensures, that IPv6 is configured for dynamically created network
interfaces like 'vlan' which would otherwise not yet exist at the time
parse_hn_line() checks for IPv6 capability of an interface before
applying the inet6 configuration from the hostname.if.
Found out, tested and OK naddy
-rw-r--r-- | distrib/miniroot/install.sub | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index e534a9ac79e..4cf38bf2546 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1061 2018/02/17 19:05:41 rpe Exp $ +# $OpenBSD: install.sub,v 1.1062 2018/02/18 00:43:16 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -2312,6 +2312,9 @@ ifstart() { local _if=$1 _hn=/mnt/etc/hostname.$1 _cmds _i=0 _line set -A _cmds + # Create interface if it does not yet exist. + { ifconfig $_if || ifconfig $_if create; } >/dev/null 2>&1 || return + ((NIFS++)) # Parse the hostname.if(5) file and fill _cmds array with interface |