Submit #2792
closedmulticast UDP detach
100%
Description
I think line 271 in sys/netinet/udp_usrreq.c is unwanted
if (&curthread->td_msgport != netisr_cpuport(0)) {
                                /*
                                 * This pr_ctloutput msg will be forwarded
                                 * to netisr0 to run; we can't do direct
                                 * detaching anymore.
                                 */
                                inp->inp_flags &= ~INP_DIRECT_DETACH;
because of lines  1648--       Here we can hit "has mcast options" panic if &curthread->td_msgport was netisr_cpuport(0)
if (inp->inp_flags & INP_DIRECT_DETACH) {
                /*
                 * Direct detaching is allowed
                 */
                KASSERT  0,
                    ("in the wildcardhash"));
                KASSERT(inp->inp_moptions  NULL, ("has mcast options"));
                udp_detach2(so);
                return;
        }
The patch removes 'if' statement, so no more fast detach for multicast udp.
Files