mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
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
39c5320dad
commit
e397f116c3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224688
@ -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…
Reference in New Issue
Block a user