HomeFreeBSD

Switch to using the inpcb MAC label instead of socket MAC label when

Description

Switch to using the inpcb MAC label instead of socket MAC label when
labeling new mbufs created from sockets/inpcbs in IPv4. This helps avoid
the need for socket layer locking in the lower level network paths
where inpcb locks are already frequently held where needed. In
particular:

  • Use the inpcb for label instead of socket in raw_append().
  • Use the inpcb for label instead of socket in tcp_output().
  • Use the inpcb for label instead of socket in tcp_respond().
  • Use the inpcb for label instead of socket in tcp_twrespond().
  • Use the inpcb for label instead of socket in syncache_respond().

While here, modify tcp_respond() to avoid assigning NULL to a stack
variable and centralize assertions about the inpcb when inp is
assigned.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, McAfee Research

Details

Provenance
rwatsonAuthored on May 4 2004, 2:11 AM
Parents
rG87f2bb8caf58: Assert inpcb lock in udp_append().
Branches
Unknown
Tags
Unknown

Event Timeline