Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Pull out a sleepable function (in6_selectsrc) f...
details: https://anonhg.NetBSD.org/src/rev/289993494e16
branches: trunk
changeset: 360614:289993494e16
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Mar 19 03:14:08 2018 +0000
description:
Pull out a sleepable function (in6_selectsrc) from a pserialize read section
diffstat:
sys/netinet6/nd6_nbr.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r 35cb2a6eda29 -r 289993494e16 sys/netinet6/nd6_nbr.c
--- a/sys/netinet6/nd6_nbr.c Mon Mar 19 03:12:09 2018 +0000
+++ b/sys/netinet6/nd6_nbr.c Mon Mar 19 03:14:08 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6_nbr.c,v 1.152 2018/03/08 06:48:23 ozaki-r Exp $ */
+/* $NetBSD: nd6_nbr.c,v 1.153 2018/03/19 03:14:08 ozaki-r Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.152 2018/03/08 06:48:23 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.153 2018/03/19 03:14:08 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -459,12 +459,15 @@
* Otherwise, we perform the source address selection as usual.
*/
s = pserialize_read_enter();
- if (hsrc && in6ifa_ifpwithaddr(ifp, hsrc))
+ if (hsrc && in6ifa_ifpwithaddr(ifp, hsrc)) {
+ pserialize_read_exit(s);
src = hsrc;
- else {
+ } else {
int error;
struct sockaddr_in6 dst_sa;
+ pserialize_read_exit(s);
+
sockaddr_in6_init(&dst_sa, &ip6->ip6_dst, 0, 0, 0);
error = in6_selectsrc(&dst_sa, NULL,
@@ -480,7 +483,6 @@
}
src = &src_in;
}
- pserialize_read_exit(s);
} else {
/*
* Source address for DAD packet must always be IPv6
Home |
Main Index |
Thread Index |
Old Index