=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/etc/netstart,v retrieving revision 1.194 retrieving revision 1.195 diff -u -r1.194 -r1.195 --- src/etc/netstart 2018/02/19 23:42:29 1.194 +++ src/etc/netstart 2018/02/21 19:57:21 1.195 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.194 2018/02/19 23:42:29 rpe Exp $ +# $OpenBSD: netstart,v 1.195 2018/02/21 19:57:21 rpe Exp $ # Turn off Strict Bourne shell mode. set +o sh @@ -73,6 +73,7 @@ } # Create interface $1 if it does not yet exist. +# Usage: ifcreate if1 ifcreate() { local _if=$1 @@ -80,6 +81,7 @@ } # Create interfaces for network pseudo-devices referred to by hostname.if files. +# Usage: vifscreate vifscreate() { local _vif _hn _if @@ -166,7 +168,7 @@ done } -# Parse /etc/mygate and add default routes for IPv4 and IPv6 +# Parse /etc/mygate and add default routes for IPv4 and IPv6. # Usage: defaultroute defaultroute() { local _cmd; @@ -216,6 +218,8 @@ exit 1 fi +# Load key material for the generation of IPv6 Semantically Opaque Interface +# Identifiers (SOII) used for link local and SLAAC addresses. $PRINT_ONLY || [[ ! -f /etc/soii.key ]] || sysctl -q "net.inet6.ip6.soiikey=$(/dev/null 2>&1; then - # IPv6 configurations. ip6kernel=YES # Disallow link-local unicast dest without outgoing scope identifiers. @@ -282,7 +286,7 @@ ip6kernel=NO fi -# Create all the pseudo interfaces up front +# Create all the pseudo interfaces up front. vifscreate # Configure all the non-loopback interfaces which we know about, but @@ -294,7 +298,7 @@ # Configure all the carp interfaces which we know about before default route. ifmstart "trunk svlan vlan carp pppoe" -# Look for default routes in /etc/mygate. +# Set default routes for IPv4 and IPv6. defaultroute # Multicast routing. @@ -310,7 +314,7 @@ ifmstart "tun tap gif etherip gre egre mobileip pflow" if [[ $ip6kernel == YES ]]; then - # This is to make sure DAD is completed before going further. + # Ensure IPv6 Duplicate Address Detection (DAD) is completed. count=0 while ((count++ < 10 && $(sysctl -n net.inet6.ip6.dad_pending) != 0)); do sleep 1