HomeFreeBSD

Eliminate use of the global ripsrc which was being used to pass address
rS180589Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

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)

Details

Provenance
rwatsonAuthored on
Parents
rS180588: revert local change
Branches
Unknown
Tags
Unknown

Event Timeline