The lookup for a IPv6 multicast addresses corresponding to
the destination addresses in the datagram is protected by
the NET_EPOCH section. Access to each PCB is protected by
INP_RLOCK during comparing. But access to socket's so_options
field is not protected. And it looks like in some cases itn some cases it is possible,
is possible, that PCB pointer is still valid, but inp_socket is not.
is notThe patch wides lock holding to protect access to inp_socket.
The patch widIt copies lock holding to protect access to inp_socketstrategy from IPv4 UDP handling.
Also fix lock and mbuf leak in udp_input() that can happen
in error case, and modify UDP statistic accounting to be the
same as for IPv6.
PR: 232192