Not assigning a link local address by default breaks various things.
authorclaudio <claudio@openbsd.org>
Tue, 15 Nov 2022 18:42:46 +0000 (18:42 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 15 Nov 2022 18:42:46 +0000 (18:42 +0000)
A lot of code depends on a eui64 address to be present. So revert this
bit of the last commit.
OK florian@

sys/netinet6/in6_ifattach.c

index 7550297..49b8bc7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: in6_ifattach.c,v 1.120 2022/11/14 17:12:55 claudio Exp $      */
+/*     $OpenBSD: in6_ifattach.c,v 1.121 2022/11/15 18:42:46 claudio Exp $      */
 /*     $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $  */
 
 /*
@@ -389,12 +389,10 @@ 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))
+       switch (ifp->if_type) {
+       case IFT_WIREGUARD:
                return (0);
+       }
 
        /* Assign a link-local address, if there's none. */
        if (in6ifa_ifpforlinklocal(ifp, 0) == NULL) {