Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet6/mld6.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet6/mld6.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.61.2.4 retrieving revision 1.72.2.1 diff -u -p -r1.61.2.4 -r1.72.2.1 --- src/sys/netinet6/mld6.c 2016/07/09 20:25:22 1.61.2.4 +++ src/sys/netinet6/mld6.c 2016/07/26 03:24:23 1.72.2.1 @@ -1,4 +1,4 @@ -/* $NetBSD: mld6.c,v 1.61.2.4 2016/07/09 20:25:22 skrll Exp $ */ +/* $NetBSD: mld6.c,v 1.72.2.1 2016/07/26 03:24:23 pgoyette Exp $ */ /* $KAME: mld6.c,v 1.25 2001/01/16 14:14:18 itojun Exp $ */ /* @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.61.2.4 2016/07/09 20:25:22 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.72.2.1 2016/07/26 03:24:23 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -394,7 +394,7 @@ mld_input(struct mbuf *m, int off) * * In Non-Listener state, we simply don't have a membership record. * In Delaying Listener state, our timer is running (in6m->in6m_timer) - * In Idle Listener state, our timer is not running + * In Idle Listener state, our timer is not running * (in6m->in6m_timer==IN6M_TIMER_UNDEF) * * The flag is in6m->in6m_state, it is set to MLD_OTHERLISTENER if @@ -504,7 +504,7 @@ out_nodrop: } static void -mld_sendpkt(struct in6_multi *in6m, int type, +mld_sendpkt(struct in6_multi *in6m, int type, const struct in6_addr *dst) { struct mbuf *mh; @@ -625,7 +625,7 @@ mld_allocbuf(struct mbuf **mh, int len, * Add an address to the list of IP6 multicast addresses for a given interface. */ struct in6_multi * -in6_addmulti(struct in6_addr *maddr6, struct ifnet *ifp, +in6_addmulti(struct in6_addr *maddr6, struct ifnet *ifp, int *errorp, int timer) { struct in6_ifaddr *ia; @@ -723,6 +723,8 @@ in6_delmulti(struct in6_multi *in6m) mld_stoptimer(in6m); if (--in6m->in6m_refcount == 0) { + int _s; + /* * No remaining claims to this record; let MLD6 know * that we are leaving the multicast group. @@ -742,6 +744,7 @@ in6_delmulti(struct in6_multi *in6m) * Delete all references of this multicasting group from * the membership arrays */ + _s = pserialize_read_enter(); IN6_ADDRLIST_READER_FOREACH(ia) { struct in6_multi_mship *imm; LIST_FOREACH(imm, &ia->ia6_memberships, i6mm_chain) { @@ -749,6 +752,7 @@ in6_delmulti(struct in6_multi *in6m) imm->i6mm_maddr = NULL; } } + pserialize_read_exit(_s); /* * Notify the network driver to update its multicast @@ -769,7 +773,7 @@ in6_delmulti(struct in6_multi *in6m) struct in6_multi_mship * -in6_joingroup(struct ifnet *ifp, struct in6_addr *addr, +in6_joingroup(struct ifnet *ifp, struct in6_addr *addr, int *errorp, int timer) { struct in6_multi_mship *imm;