Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/netinet6 Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/ab2d1a265c6d
branches:  netbsd-9
changeset: 962911:ab2d1a265c6d
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Sep 01 14:06:22 2019 +0000

description:
Pull up following revision(s) (requested by roy in ticket #148):

        sys/netinet6/nd6.c: revision 1.261

inet6: don't set an invalid lladdr in nd6_free()

We don't want to announce that we've deleted a hwaddr of all zeros.

diffstat:

 sys/netinet6/nd6.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 5a2228a35022 -r ab2d1a265c6d sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Sun Sep 01 14:04:37 2019 +0000
+++ b/sys/netinet6/nd6.c        Sun Sep 01 14:06:22 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nd6.c,v 1.256.2.3 2019/09/01 11:00:31 martin Exp $     */
+/*     $NetBSD: nd6.c,v 1.256.2.4 2019/09/01 14:06:22 martin Exp $     */
 /*     $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $   */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.256.2.3 2019/09/01 11:00:31 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.256.2.4 2019/09/01 14:06:22 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1192,6 +1192,7 @@
        struct ifnet *ifp;
        struct in6_addr *in6;
        struct sockaddr_in6 sin6;
+       const char *lladdr;
 
        KASSERT(ln != NULL);
        LLE_WLOCK_ASSERT(ln);
@@ -1282,8 +1283,8 @@
        }
 
        sockaddr_in6_init(&sin6, in6, 0, 0, 0);
-       rt_clonedmsg(RTM_DELETE, sin6tosa(&sin6),
-           (const uint8_t *)&ln->ll_addr, ifp);
+       lladdr = ln->la_flags & LLE_VALID ? (const char *)&ln->ll_addr : NULL;
+       rt_clonedmsg(RTM_DELETE, sin6tosa(&sin6), lladdr, ifp);
 
        /*
         * Save to unlock. We still hold an extra reference and will not



Home | Main Index | Thread Index | Old Index