Date: Fri, 18 Jul 2008 10:47:07 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netinet raw_ip.c Message-ID: <200807181047.m6IAl9o1045612@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807181047.m6IAl9o1045612>