View | Details | Raw Unified | Return to bug 1162 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-5 / +7 lines)
Line  Link Here
0
-- sshd.c      2006-02-24 10:03:57.000000000 +0530
0
++ sshd.c-fix  2006-02-24 10:06:16.000000000 +0530
Lines 1309-1316 Link Here
1309
                           &on, sizeof(on)) == -1)
1309
                           &on, sizeof(on)) == -1)
1310
                               error("setsockopt SO_REUSEADDR: %s", strerror(errno));
1310
                               error("setsockopt SO_REUSEADDR: %s", strerror(errno));
1311
                       debug("Bind to port %s on %s.", strport, ntop);
1312
1313
                       /* Bind the socket to the desired port. */
1311
                       /* Bind the socket to the desired port. */
1314
                       if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1312
                       if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1315
                               if (!ai->ai_next)
1313
                               if (!ai->ai_next)
Lines 1318-1331 Link Here
1318
                                           strport, ntop, strerror(errno));
1316
                                           strport, ntop, strerror(errno));
1319
                               close(listen_sock);
1317
                               close(listen_sock);
1320
                               continue;
1318
                               continue;
1321
                       }
1319
                               }
1320
                       else
1321
                               debug("Bind to port %s on %s.", strport, ntop);
1322
1322
                       listen_socks[num_listen_socks] = listen_sock;
1323
                       listen_socks[num_listen_socks] = listen_sock;
1323
                       num_listen_socks++;
1324
                       num_listen_socks++;
1324
                       /* Start listening on the port. */
1325
                       /* Start listening on the port. */
1325
                       logit("Server listening on %s port %s.", ntop, strport);
1326
                       if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0)
1326
                       if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0)
1327
                               fatal("listen: %.100s", strerror(errno));
1327
                               fatal("listen: %.100s", strerror(errno));
1328
                       else
1329
                               logit("Server listening on %s port %s.", ntop, strport);
1328
               }
1330
               }
1329
               freeaddrinfo(options.listen_addrs);
1331
               freeaddrinfo(options.listen_addrs);

Return to bug 1162