CVSROOT: /cvs Module name: src Changes by: bl...@cvs.openbsd.org 2024/11/05 15:44:20
Modified files: sys/kern : kern_sysctl.c sys/netinet : in_pcb.c raw_ip.c udp_usrreq.c Log message: Use PCB iterator for raw IP input deliver loop. Inspired by mvs@ idea of the iterator in the UDP multicast loop, implement the same for raw IP input delivery. This removes an unneccesary rwlock and only uses table mutex. When comparing the inp routing table, address and port, the table lock must be held. So assume that in_pcb_iterator() already has the table mutex and hold it while traversing the list and doing the checks. Release the mutex during mbuf copy, socket buffer append and the upcalls. Adapt the logic for both rip_input() and udp_input(). In rip_input() move the actual work to rip_sbappend(). This can be called without mutex during list traversal and for the final element. OK mvs@