diff options
author | rwatson <rwatson@FreeBSD.org> | 2011-08-06 19:20:17 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2011-08-06 19:20:17 +0000 |
commit | 8a6eaea7b81492e0353b8473e3c0b61706e8494d (patch) | |
tree | 8d57dc48fe9e643f02cb00c162fcc7dfd8a5c6c9 | |
parent | 4f6bed279cf88a1effc620907076b76f5ceebd07 (diff) | |
download | FreeBSD-src-8a6eaea7b81492e0353b8473e3c0b61706e8494d.zip FreeBSD-src-8a6eaea7b81492e0353b8473e3c0b61706e8494d.tar.gz |
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
-rw-r--r-- | tools/regression/netinet/tcpdrop/tcpdrop.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/regression/netinet/tcpdrop/tcpdrop.c b/tools/regression/netinet/tcpdrop/tcpdrop.c index e6b7f43..7cfc658 100644 --- a/tools/regression/netinet/tcpdrop/tcpdrop.c +++ b/tools/regression/netinet/tcpdrop/tcpdrop.c @@ -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; |