Fix a bug in r24147 where svctcp_create() was passing the wrong length
authorGreg Hudson <ghudson@mit.edu>
Sat, 26 Jun 2010 17:37:20 +0000 (17:37 +0000)
committerGreg Hudson <ghudson@mit.edu>
Sat, 26 Jun 2010 17:37:20 +0000 (17:37 +0000)
argument to bind(), causing it to fail on Solaris.

ticket: 6746

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24148 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/rpc/svc_tcp.c

index b9aee070f911b67b03d71e89923a2a25014cf397..3ae39ee8c206e77c78a740ba0b4faff38e60403d 100644 (file)
@@ -175,7 +175,7 @@ svctcp_create(
        sin.sin_family = AF_INET;
        if (bindresvport(sock, &sin)) {
                sin.sin_port = 0;
-               (void)bind(sock, (struct sockaddr *)&sin, len);
+               (void)bind(sock, (struct sockaddr *)&sin, sizeof(sin));
        }
        if (getsockname(sock, (struct sockaddr *)&addr, &len) != 0) {
                perror("svc_tcp.c - cannot getsockname");