Check if we need to apply these two commits from udp6_input() also to IPv4
( after https://reviews.freebsd.org/D17525 ) is in.
The locking is a lot simpler in legacy IP, so we don't have to apply the changes 1:1 but can get away with a single check.
XXX TODO: harmonize IPv6 and IPv4 locking and code flow.
A commit references this bug:
Date: Fri Oct 12 22:51:45 UTC 2018
New revision: 339339
In udp_input() when walking the pcblist we can come across
an inp marked FREED after the epoch(9) changes.
Check once we hold the lock and skip the inp if it is the case.
Contrary to IPv6 the locking of the inp is outside the multicast
section and hence a single check seems to suffice.
Reviewed by: mmacy, markj
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D17540