diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 3bfe788a2887..c9b4f3fc74e6 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -479,11 +479,13 @@ udp_input(struct mbuf *m, int off) * and source-specific multicast. [RFC3678] */ imo = inp->inp_moptions; - if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) && - imo != NULL) { + if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { struct sockaddr_in group; int blocked; - + if(imo == NULL) { + INP_RUNLOCK(inp); + continue; + } bzero(&group, sizeof(struct sockaddr_in)); group.sin_len = sizeof(struct sockaddr_in); group.sin_family = AF_INET;