- Fixes non-zero'd out sin_zero field problem so that the padding

is used as it is supposed to be.

Inspired by: PR #31704
Approved by: jdp
Reviewed by: jhb, -net@
This commit is contained in:
Andrew R. Reiter 2001-11-06 00:48:01 +00:00
parent d16d31f42e
commit 83103a7397
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86117

View File

@ -221,6 +221,7 @@ in_pcbbind(inp, nam, td)
reuseport = SO_REUSEADDR|SO_REUSEPORT;
} else if (sin->sin_addr.s_addr != INADDR_ANY) {
sin->sin_port = 0; /* yech... */
bzero(&sin->sin_zero, sizeof(sin->sin_zero));
if (ifa_ifwithaddr((struct sockaddr *)sin) == 0)
return (EADDRNOTAVAIL);
}