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
This commit is contained in:
parent
4f6bed279c
commit
8a6eaea7b8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user