CVSROOT: /cvs Module name: src Changes by: bl...@cvs.openbsd.org 2023/12/01 07:08:04
Modified files: sys/netinet : tcp_usrreq.c udp_usrreq.c sys/netinet6 : in6_pcb.c in6_src.c ip6_var.h raw_ip6.c udp6_output.c Log message: Make internet PCB connect more consistent. The public interface is in_pcbconnect(). It dispatches to in6_pcbconnect() if necessary. Call the former from tcp_connect() and udp_connect(). In in6_pcbconnect() initialization in6a = NULL is not necessary. in6_pcbselsrc() sets the pointer, but does not read the value. Pass a constant in6_addr pointer to in6_pcbselsrc() and in6_selectsrc(). It returns a reference to the address of some internal data structure. We want to be sure that in6_addr is not modified this way. IPv4 in_pcbselsrc() solves this by passing a copy of the address. OK kn@ sashan@ mvs@