cvs commit: src/sys/netinet ip_divert.c raw_ip.c udp_usrreq.c src/sys/netinet6 raw_ip6.c udp6_usrreq.c

Robert Watson rwatson at FreeBSD.org
Sat Apr 1 16:20:55 UTC 2006


rwatson     2006-04-01 16:20:54 UTC

  FreeBSD src repository

  Modified files:
    sys/netinet          ip_divert.c raw_ip.c udp_usrreq.c 
    sys/netinet6         raw_ip6.c udp6_usrreq.c 
  Log:
  Update in_pcb-derived basic socket types following changes to
  pru_abort(), pru_detach(), and in_pcbdetach():
  
  - Universally support and enforce the invariant that so_pcb is
    never NULL, converting dozens of unnecessary NULL checks into
    assertions, and eliminating dozens of unnecessary error handling
    cases in protocol code.
  
  - In some cases, eliminate unnecessary pcbinfo locking, as it is no
    longer required to ensure so_pcb != NULL.  For example, in protocol
    shutdown methods, and in raw IP send.
  
  - Abort and detach protocol switch methods no longer return failures,
    nor attempt to free sockets, as the socket layer does this.
  
  - Invoke in_pcbfree() after in_pcbdetach() in order to free the
    detached in_pcb structure for a socket.
  
  MFC after:      3 months
  
  Revision  Changes    Path
  1.116     +15 -34    src/sys/netinet/ip_divert.c
  1.159     +24 -60    src/sys/netinet/raw_ip.c
  1.185     +16 -35    src/sys/netinet/udp_usrreq.c
  1.60      +13 -22    src/sys/netinet6/raw_ip6.c
  1.59      +18 -48    src/sys/netinet6/udp6_usrreq.c


More information about the cvs-src mailing list