cvs commit: src/sys/netinet raw_ip.c

Robert Watson rwatson at FreeBSD.org
Fri Jul 18 10:47:10 UTC 2008


rwatson     2008-07-18 10:47:07 UTC

  FreeBSD src repository

  Modified files:
    sys/netinet          raw_ip.c 
  Log:
  SVN rev 180589 on 2008-07-18 10:47:07Z by rwatson
  
  Eliminate use of the global ripsrc which was being used to pass address
  information from rip_input() to rip_append().  Instead, pass the source
  address for an IP datagram to rip_append() using a stack-allocated
  sockaddr_in, similar to udp_input() and udp_append().
  
  Prior to the move to rwlocks for inpcbinfo, this was not a problem, as
  use of the global was synchronized using the ripcbinfo mutex, but with
  read-locking there is the potential for a race during concurrent
  receive.
  
  This problem is not present in the IPv6 raw IP socket code, which
  already used a stack variable for the address.
  
  Spotted by:     mav
  MFC after:      1 week (before inpcbinfo rwlock changes)
  
  Revision  Changes    Path
  1.188     +10 -7     src/sys/netinet/raw_ip.c


More information about the cvs-all mailing list