Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/0fb6472738c3
branches:  netbsd-8
changeset: 453780:0fb6472738c3
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Aug 19 14:28:12 2019 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #1340):

        sys/netinet6/nd6.c: revision 1.257

Add missing IFNET_LOCK for regen_tmpaddr
Reported by ryo@

diffstat:

 sys/netinet6/nd6.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 255a478b177e -r 0fb6472738c3 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Mon Aug 19 14:27:16 2019 +0000
+++ b/sys/netinet6/nd6.c        Mon Aug 19 14:28:12 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nd6.c,v 1.232.2.11 2019/07/26 11:27:36 martin Exp $    */
+/*     $NetBSD: nd6.c,v 1.232.2.12 2019/08/19 14:28:12 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.232.2.11 2019/07/26 11:27:36 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.232.2.12 2019/08/19 14:28:12 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -668,8 +668,12 @@
                        if (ip6_use_tempaddr &&
                            (ia6->ia6_flags & IN6_IFF_TEMPORARY) != 0 &&
                            (oldflags & IN6_IFF_DEPRECATED) == 0) {
+                               int ret;
 
-                               if (regen_tmpaddr(ia6) == 0) {
+                               IFNET_LOCK(ia6->ia_ifa.ifa_ifp);
+                               ret = regen_tmpaddr(ia6);
+                               IFNET_UNLOCK(ia6->ia_ifa.ifa_ifp);
+                               if (ret == 0) {
                                        /*
                                         * A new temporary address is
                                         * generated.



Home | Main Index | Thread Index | Old Index