Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/netinet Pull up following revision(s) (requested by o...
details: https://anonhg.NetBSD.org/src/rev/0dbd35ebbd53
branches: netbsd-8
changeset: 851292:0dbd35ebbd53
user: snj <snj%NetBSD.org@localhost>
date: Sat Jan 13 21:52:06 2018 +0000
description:
Pull up following revision(s) (requested by ozaki-r in ticket #494):
sys/netinet/ip_output.c: revision 1.291-1.292
- this is not python, we need braces
- protect ifp locking against NULL
--
from ozaki-r: use the proper ifp.
XXX: perhaps push the lock in in_delmulti()?
diffstat:
sys/netinet/ip_output.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (46 lines):
diff -r d0f7052dab11 -r 0dbd35ebbd53 sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Sat Jan 13 21:50:31 2018 +0000
+++ b/sys/netinet/ip_output.c Sat Jan 13 21:52:06 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.279.2.4 2018/01/02 10:56:58 snj Exp $ */
+/* $NetBSD: ip_output.c,v 1.279.2.5 2018/01/13 21:52:06 snj Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.279.2.4 2018/01/02 10:56:58 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.279.2.5 2018/01/13 21:52:06 snj Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1806,13 +1806,14 @@
bound = curlwp_bind();
if (sopt->sopt_size == sizeof(struct ip_mreq))
error = ip_get_membership(sopt, &ifp, &psref, &ia, false);
- else
+ else {
#ifdef INET6
error = ip6_get_membership(sopt, &ifp, &psref, &ia, sizeof(ia));
#else
error = EINVAL;
goto out;
#endif
+ }
if (error)
goto out;
@@ -1835,9 +1836,9 @@
* Give up the multicast address record to which the
* membership points.
*/
- IFNET_LOCK(ifp);
+ IFNET_LOCK(imo->imo_membership[i]->inm_ifp);
in_delmulti(imo->imo_membership[i]);
- IFNET_UNLOCK(ifp);
+ IFNET_UNLOCK(imo->imo_membership[i]->inm_ifp);
/*
* Remove the gap in the membership array.
Home |
Main Index |
Thread Index |
Old Index