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

Diff for /src/usr.bin/ssh/ssh.c between version 1.255 and 1.256

version 1.255, 2005/12/06 22:38:27 version 1.256, 2005/12/08 18:34:11
Line 336 
Line 336 
                                 exit(0);                                  exit(0);
                         break;                          break;
                 case 'w':                  case 'w':
                         options.tun_open = 1;                          if (options.tun_open == -1)
                                   options.tun_open = SSH_TUNMODE_DEFAULT;
                         options.tun_local = a2tun(optarg, &options.tun_remote);                          options.tun_local = a2tun(optarg, &options.tun_remote);
                         if (options.tun_local < -1) {                          if (options.tun_local == SSH_TUNID_ERR) {
                                 fprintf(stderr, "Bad tun device '%s'\n", optarg);                                  fprintf(stderr, "Bad tun device '%s'\n", optarg);
                                 exit(1);                                  exit(1);
                         }                          }
Line 1055 
Line 1056 
                 packet_send();                  packet_send();
         }          }
   
         if (options.tun_open) {          if (options.tun_open != SSH_TUNMODE_NO) {
                 Channel *c;                  Channel *c;
                 int fd;                  int fd;
   
                 debug("Requesting tun.");                  debug("Requesting tun.");
                 if ((fd = tun_open(options.tun_local)) >= 0) {                  if ((fd = tun_open(options.tun_local,
                       options.tun_open)) >= 0) {
                         c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1,                          c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1,
                             CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,                              CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,
                             0, "tun", 1);                              0, "tun", 1);
Line 1070 
Line 1072 
                         packet_put_int(c->self);                          packet_put_int(c->self);
                         packet_put_int(c->local_window_max);                          packet_put_int(c->local_window_max);
                         packet_put_int(c->local_maxpacket);                          packet_put_int(c->local_maxpacket);
                           packet_put_int(options.tun_open);
                         packet_put_int(options.tun_remote);                          packet_put_int(options.tun_remote);
                         packet_send();                          packet_send();
                 }                  }

Legend:
Removed from v.1.255  
changed lines
  Added in v.1.256