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

Diff for /src/usr.bin/ssh/channels.c between version 1.87 and 1.88

version 1.87, 2001/01/31 20:37:22 version 1.88, 2001/02/01 21:58:08
Line 600 
Line 600 
         struct sockaddr addr;          struct sockaddr addr;
         int newsock, newch;          int newsock, newch;
         socklen_t addrlen;          socklen_t addrlen;
         char buf[1024], *remote_hostname, *rtype;          char buf[1024], *remote_ipaddr, *rtype;
         int remote_port;          int remote_port;
   
         rtype = (c->type == SSH_CHANNEL_RPORT_LISTENER) ?          rtype = (c->type == SSH_CHANNEL_RPORT_LISTENER) ?
Line 616 
Line 616 
                         error("accept: %.100s", strerror(errno));                          error("accept: %.100s", strerror(errno));
                         return;                          return;
                 }                  }
                 remote_hostname = get_remote_hostname(newsock);                  remote_ipaddr = get_peer_ipaddr(newsock);
                 remote_port = get_peer_port(newsock);                  remote_port = get_peer_port(newsock);
                 snprintf(buf, sizeof buf,                  snprintf(buf, sizeof buf,
                     "listen port %d for %.100s port %d, "                      "listen port %d for %.100s port %d, "
                     "connect from %.200s port %d",                      "connect from %.200s port %d",
                     c->listening_port, c->path, c->host_port,                      c->listening_port, c->path, c->host_port,
                     remote_hostname, remote_port);                      remote_ipaddr, remote_port);
   
                 newch = channel_new(rtype,                  newch = channel_new(rtype,
                     SSH_CHANNEL_OPENING, newsock, newsock, -1,                      SSH_CHANNEL_OPENING, newsock, newsock, -1,
Line 644 
Line 644 
                                 packet_put_int(c->host_port);                                  packet_put_int(c->host_port);
                         }                          }
                         /* originator host and port */                          /* originator host and port */
                         packet_put_cstring(remote_hostname);                          packet_put_cstring(remote_ipaddr);
                         packet_put_int(remote_port);                          packet_put_int(remote_port);
                         packet_send();                          packet_send();
                 } else {                  } else {
Line 657 
Line 657 
                         }                          }
                         packet_send();                          packet_send();
                 }                  }
                 xfree(remote_hostname);                  xfree(remote_ipaddr);
         }          }
 }  }
   

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.88