pr_ctlinput is usually called when certains types of ICMP packets are received.
However, the processing of ICMP packets happens in netisr0, which means the
thread context, in which pr_ctlinput is called, is not correct. To handle this
following two fixes are applied:
- Add pr_ctlport to protosw and ip6protosw, which could be used to locate
correct msgport to call pr_ctlinput for specific protocol
- All necessary information needed by pr_ctlinput are gather into one netmsg,
and this netmsg is delivered synchronously (some information is on the stack)
Note for new protocol implementation:
pr_ctlinput and pr_ctlport should be both NULL or both non-NULL.
Obtained-from: dillon@
Tested-by: pavalos@
21 files changed: