From owner-svn-src-all@FreeBSD.ORG Sat Aug 6 19:20:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61614106564A; Sat, 6 Aug 2011 19:20:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50DCF8FC15; Sat, 6 Aug 2011 19:20:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p76JKHY7064099; Sat, 6 Aug 2011 19:20:17 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p76JKHDe064097; Sat, 6 Aug 2011 19:20:17 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201108061920.p76JKHDe064097@svn.freebsd.org> From: Robert Watson Date: Sat, 6 Aug 2011 19:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224688 - head/tools/regression/netinet/tcpdrop X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 19:20:17 -0000 Author: rwatson Date: Sat Aug 6 19:20:17 2011 New Revision: 224688 URL: http://svn.freebsd.org/changeset/base/224688 Log: Properly initialise the "len" argument to getsockname(2) in the tcpdrop regression test so that it works (more) consistently. Approved by: re (bz) Sponsored by: Juniper Networks Modified: head/tools/regression/netinet/tcpdrop/tcpdrop.c Modified: head/tools/regression/netinet/tcpdrop/tcpdrop.c ============================================================================== --- head/tools/regression/netinet/tcpdrop/tcpdrop.c Sat Aug 6 17:53:45 2011 (r224687) +++ head/tools/regression/netinet/tcpdrop/tcpdrop.c Sat Aug 6 19:20:17 2011 (r224688) @@ -233,6 +233,7 @@ main(int argc, char *argv[]) bzero(&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); + len = sizeof(sin); if (getsockname(listen_fd, (struct sockaddr *)&sin, &len) < 0) err(-1, "getsockname"); port = sin.sin_port;