[BACK]Return to sshd.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshd.c between version 1.257 and 1.258

version 1.257, 2002/07/23 16:03:10 version 1.258, 2002/09/13 19:23:09
Line 789 
Line 789 
         const char *remote_ip;          const char *remote_ip;
         int remote_port;          int remote_port;
         FILE *f;          FILE *f;
         struct linger linger;  
         struct addrinfo *ai;          struct addrinfo *ai;
         char ntop[NI_MAXHOST], strport[NI_MAXSERV];          char ntop[NI_MAXHOST], strport[NI_MAXSERV];
         int listen_sock, maxfd;          int listen_sock, maxfd;
Line 1102 
Line 1101 
                                 continue;                                  continue;
                         }                          }
                         /*                          /*
                          * Set socket options.  We try to make the port                           * Set socket options.
                          * reusable and have it close as fast as possible                           * Allow local port reuse in TIME_WAIT.
                          * without waiting in unnecessary wait states on  
                          * close.  
                          */                           */
                         setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR,                          if (setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR,
                             &on, sizeof(on));                              &on, sizeof(on)) == -1)
                         linger.l_onoff = 1;                                  error("setsockopt SO_REUSEADDR: %s", strerror(errno));
                         linger.l_linger = 5;  
                         setsockopt(listen_sock, SOL_SOCKET, SO_LINGER,  
                             &linger, sizeof(linger));  
   
                         debug("Bind to port %s on %s.", strport, ntop);                          debug("Bind to port %s on %s.", strport, ntop);
   
Line 1355 
Line 1349 
         signal(SIGTERM, SIG_DFL);          signal(SIGTERM, SIG_DFL);
         signal(SIGQUIT, SIG_DFL);          signal(SIGQUIT, SIG_DFL);
         signal(SIGCHLD, SIG_DFL);          signal(SIGCHLD, SIG_DFL);
   
         /*  
          * Set socket options for the connection.  We want the socket to  
          * close as fast as possible without waiting for anything.  If the  
          * connection is not a socket, these will do nothing.  
          */  
         /* setsockopt(sock_in, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); */  
         linger.l_onoff = 1;  
         linger.l_linger = 5;  
         setsockopt(sock_in, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));  
   
         /* Set keepalives if requested. */          /* Set keepalives if requested. */
         if (options.keepalives &&          if (options.keepalives &&

Legend:
Removed from v.1.257  
changed lines
  Added in v.1.258