Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Aug 2011 19:20:17 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224688 - head/tools/regression/netinet/tcpdrop
Message-ID:  <201108061920.p76JKHDe064097@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108061920.p76JKHDe064097>