kernel - network protocol thread routing
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 9 Sep 2010 08:32:07 +0000 (01:32 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 9 Sep 2010 08:32:07 +0000 (01:32 -0700)
commit6a704092ee2b3384906df96bf4b66575a12f38e2
tree3283690e50b8563c730111bd81ec7cc7e15a593d
parent2d23a8bebdf3b83c06495aceae0d5f64f404b9d0
kernel - network protocol thread routing

* ip_input() now calls ip_mport() unconditionally and physically compares
  the port to &curthread->td_msgport.  If they do not match the packet
  will be forwarded to the correct protocol thread.

* ip6_input() now unconditionally calls sw6->pr_soport() on the last
  received header and forwards the packet to the correct protocol thread.

  udp6, tcp6, and rip6 are now marked as terminal protocol (PR_LASTHDR).
  Though I'm not sure this is correct they must be marked this way for
  the packet to be forwarded to the correct protocol thread.

  This fixes an assertion panic when tcp6_input() calls tcp_input().
  tcp_input() is expecting to be run on the same protocol thread assigned
  to its socket, otherwise callout timers and other entities will get
  confused.
sys/net/netisr.h
sys/netinet/ip_input.c
sys/netinet6/in6_proto.c
sys/netinet6/ip6_input.c
sys/netinet6/ip6_var.h