Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet from ozaki-r: use the proper ifp.



details:   https://anonhg.NetBSD.org/src/rev/d66010865a51
branches:  trunk
changeset: 828941:d66010865a51
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 10 18:51:31 2018 +0000

description:
from ozaki-r: use the proper ifp.
XXX: perhaps push the lock in in_delmulti()?

diffstat:

 sys/netinet/ip_output.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r 24830391df4c -r d66010865a51 sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c   Wed Jan 10 18:39:50 2018 +0000
+++ b/sys/netinet/ip_output.c   Wed Jan 10 18:51:31 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_output.c,v 1.291 2018/01/10 17:36:06 christos Exp $ */
+/*     $NetBSD: ip_output.c,v 1.292 2018/01/10 18:51:31 christos 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.291 2018/01/10 17:36:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.292 2018/01/10 18:51:31 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1906,11 +1906,9 @@
         * Give up the multicast address record to which the
         * membership points.
         */
-       if (ifp)
-               IFNET_LOCK(ifp);
+       IFNET_LOCK(imo->imo_membership[i]->inm_ifp);
        in_delmulti(imo->imo_membership[i]);
-       if (ifp)
-               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