version 1.55.8.2, 2017/12/03 11:39:04 |
version 1.86, 2017/03/02 05:27:39 |
Line 242 mld_timeo(void *arg) |
|
Line 242 mld_timeo(void *arg) |
|
|
|
KASSERT(in6m->in6m_refcount > 0); |
KASSERT(in6m->in6m_refcount > 0); |
|
|
SOFTNET_KERNEL_LOCK_UNLESS_NET_MPSAFE(); |
#ifndef NET_MPSAFE |
|
mutex_enter(softnet_lock); |
|
KERNEL_LOCK(1, NULL); |
|
#endif |
rw_enter(&in6_multilock, RW_WRITER); |
rw_enter(&in6_multilock, RW_WRITER); |
if (in6m->in6m_timer == IN6M_TIMER_UNDEF) |
if (in6m->in6m_timer == IN6M_TIMER_UNDEF) |
goto out; |
goto out; |
Line 260 mld_timeo(void *arg) |
|
Line 263 mld_timeo(void *arg) |
|
|
|
out: |
out: |
rw_exit(&in6_multilock); |
rw_exit(&in6_multilock); |
SOFTNET_KERNEL_UNLOCK_UNLESS_NET_MPSAFE(); |
#ifndef NET_MPSAFE |
|
KERNEL_UNLOCK_ONE(NULL); |
|
mutex_exit(softnet_lock); |
|
#else |
|
return; |
|
#endif |
} |
} |
|
|
static u_long |
static u_long |
Line 893 in6_purge_multi(struct ifnet *ifp) |
|
Line 901 in6_purge_multi(struct ifnet *ifp) |
|
rw_exit(&in6_multilock); |
rw_exit(&in6_multilock); |
} |
} |
|
|
void |
|
in6_multi_lock(int op) |
|
{ |
|
|
|
rw_enter(&in6_multilock, op); |
|
} |
|
|
|
void |
|
in6_multi_unlock(void) |
|
{ |
|
|
|
rw_exit(&in6_multilock); |
|
} |
|
|
|
bool |
|
in6_multi_locked(int op) |
|
{ |
|
|
|
switch (op) { |
|
case RW_READER: |
|
return rw_read_held(&in6_multilock); |
|
case RW_WRITER: |
|
return rw_write_held(&in6_multilock); |
|
default: |
|
return rw_lock_held(&in6_multilock); |
|
} |
|
} |
|
|
|
struct in6_multi_mship * |
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) |
int *errorp, int timer) |
Line 945 in6_joingroup(struct ifnet *ifp, struct |
|
Line 925 in6_joingroup(struct ifnet *ifp, struct |
|
int |
int |
in6_leavegroup(struct in6_multi_mship *imm) |
in6_leavegroup(struct in6_multi_mship *imm) |
{ |
{ |
struct in6_multi *in6m; |
|
|
|
rw_enter(&in6_multilock, RW_READER); |
if (imm->i6mm_maddr) { |
in6m = imm->i6mm_maddr; |
in6_delmulti(imm->i6mm_maddr); |
rw_exit(&in6_multilock); |
|
if (in6m != NULL) { |
|
in6_delmulti(in6m); |
|
} |
} |
free(imm, M_IPMADDR); |
free(imm, M_IPMADDR); |
return 0; |
return 0; |
Line 1054 in6_multicast_sysctl(SYSCTLFN_ARGS) |
|
Line 1030 in6_multicast_sysctl(SYSCTLFN_ARGS) |
|
} |
} |
|
|
s = pserialize_read_enter(); |
s = pserialize_read_enter(); |
|
ifa_release(ifa, &psref_ia); |
|
|
break; |
break; |
} |
} |