On Mon, Oct 24, 2022 at 07:01:02PM +0000, Klemens Nanni wrote:
> IPv6LL no longer uses SOII (ifconfig(8) `soii' description got fixed).

Relevant commit:

        sys/netinet6/in6_ifattach.c revision 1.114
        date: 2019/08/21 15:32:18;  author: florian;  state: Exp;  lines: +2 
-83;
        Remove support for semantically opace interface identifiers (RFC 7217)
        for IPv6 link local addresses.

> Don't ignore this step in dry-runs.  In analogy to how we print
>       { ifconfig trunk0 || ifconfig trunk0 create; }
> 
> the file check could be deferred and printed as well, i.e.
>       [[ -f /etc/soii.key ]] && sysctl ...
> 
> Better print the check?
> Feedback? Objection? OK?

Here's the diff that prints the check, which is probably better.

Index: netstart
===================================================================
RCS file: /cvs/src/etc/netstart,v
retrieving revision 1.222
diff -u -p -r1.222 netstart
--- netstart    24 Oct 2022 20:51:07 -0000      1.222
+++ netstart    26 Oct 2022 17:29:45 -0000
@@ -323,9 +323,13 @@ done
 shift $((OPTIND-1))
 
 # 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=$(</etc/soii.key)"
+# Identifiers (SOII) used for SLAAC addresses.
+if $PRINT_ONLY; then
+       print -r -- '[[ -f /etc/soii.key ]] && sysctl -q 
"net.inet6.ip6.soiikey=$(</etc/soii.key)"'
+else
+       [[ -f /etc/soii.key ]] &&
+               sysctl -q "net.inet6.ip6.soiikey=$(</etc/soii.key)"
+fi
 
 # If we were invoked with a list of interface names, just reconfigure these
 # interfaces (or bridges), add default routes and return.

Reply via email to