Date: Wed, 21 Aug 2002 04:57:13 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netinet in_pcb.c in_pcb.h tcp_usrreq.c src/sys/netinet6 in6_pcb.c in6_pcb.h Message-ID: <200208211157.g7LBvDAS098167@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
truckman 2002/08/21 04:57:13 PDT Modified files: sys/netinet in_pcb.c in_pcb.h tcp_usrreq.c sys/netinet6 in6_pcb.c in6_pcb.h Log: Create new functions in_sockaddr(), in6_sockaddr(), and in6_v4mapsin6_sockaddr() which allocate the appropriate sockaddr_in* structure and initialize it with the address and port information passed as arguments. Use calls to these new functions to replace code that is replicated multiple times in in_setsockaddr(), in_setpeeraddr(), in6_setsockaddr(), in6_setpeeraddr(), in6_mapped_sockaddr(), and in6_mapped_peeraddr(). Inline COMMON_END in tcp_usr_accept() so that we can call in_sockaddr() with temporary copies of the address and port after the PCB is unlocked. Fix the lock violation in tcp6_usr_accept() (caused by calling MALLOC() inside in6_mapped_peeraddr() while the PCB is locked) by changing the implementation of tcp6_usr_accept() to match tcp_usr_accept(). Reviewed by: suz Revision Changes Path 1.110 +27 -26 src/sys/netinet/in_pcb.c 1.52 +2 -0 src/sys/netinet/in_pcb.h 1.81 +43 -20 src/sys/netinet/tcp_usrreq.c 1.32 +54 -38 src/sys/netinet6/in6_pcb.c 1.9 +4 -0 src/sys/netinet6/in6_pcb.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208211157.g7LBvDAS098167>