X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cc8bc92ae4a8e9f1a1ab61bf83d34ad8150b3405..5c9f46613a83ebfc29a5b1f099448259e96a98f0:/bsd/netinet/ip_icmp.c?ds=sidebyside diff --git a/bsd/netinet/ip_icmp.c b/bsd/netinet/ip_icmp.c index 3d7ecafe3..ab1b0452e 100644 --- a/bsd/netinet/ip_icmp.c +++ b/bsd/netinet/ip_icmp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2016 Apple Inc. All rights reserved. + * Copyright (c) 2000-2017 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -538,9 +538,17 @@ icmp_input(struct mbuf *m, int hlen) * notification to TCP layer. */ ctlfunc = ip_protox[icp->icmp_ip.ip_p]->pr_ctlinput; - if (ctlfunc) + + if (ctlfunc) { + LCK_MTX_ASSERT(inet_domain_mutex, LCK_MTX_ASSERT_OWNED); + + lck_mtx_unlock(inet_domain_mutex); + (*ctlfunc)(code, (struct sockaddr *)&icmpsrc, (void *)&icp->icmp_ip, m->m_pkthdr.rcvif); + + lck_mtx_lock(inet_domain_mutex); + } break; badcode: