From owner-cvs-all Wed Aug 21 4:57:16 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C073F37B400; Wed, 21 Aug 2002 04:57:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 888A343E75; Wed, 21 Aug 2002 04:57:13 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Received: from freefall.freebsd.org (truckman@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7LBvDJU098168; Wed, 21 Aug 2002 04:57:13 -0700 (PDT) (envelope-from truckman@freefall.freebsd.org) Received: (from truckman@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7LBvDAS098167; Wed, 21 Aug 2002 04:57:13 -0700 (PDT) Message-Id: <200208211157.g7LBvDAS098167@freefall.freebsd.org> From: Don Lewis Date: Wed, 21 Aug 2002 04:57:13 -0700 (PDT) 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 X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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