My last commit to in6_ifattach() broke a few regress tests.
The problem is that 'ifconfig tun0 inet6 eui64' no longer works.
Now I thought it would if called explicitly but no.
So lets peddal back a bit and assign link-local addresses on all interface
but wg(4). For mpe(4) this does not really matter and it does help other
point-to-point interfaces where the system somewhat expects a link-local
addr to be present.

With this all regress tests pass again.
-- 
:wq Claudio

Index: netinet6/in6_ifattach.c
===================================================================
RCS file: /cvs/src/sys/netinet6/in6_ifattach.c,v
retrieving revision 1.120
diff -u -p -r1.120 in6_ifattach.c
--- netinet6/in6_ifattach.c     14 Nov 2022 17:12:55 -0000      1.120
+++ netinet6/in6_ifattach.c     15 Nov 2022 18:14:10 -0000
@@ -389,12 +389,11 @@ in6_ifattach(struct ifnet *ifp)
                        return (error);
        }
 
-       /*
-        * Only interfaces that need the ND cache should automatically
-        * assign a link local address.
-        */
-       if (!nd6_need_cache(ifp))
+       /* For wg(4) skip assignment of link local address. */
+       switch (ifp->if_type) {
+       case IFT_WIREGUARD:
                return (0);
+       }
 
        /* Assign a link-local address, if there's none. */
        if (in6ifa_ifpforlinklocal(ifp, 0) == NULL) {

Reply via email to