[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.299 and 1.300

version 1.299, 2009/11/11 21:37:03 version 1.300, 2010/01/09 23:04:13
Line 159 
Line 159 
 /* AF_UNSPEC or AF_INET or AF_INET6 */  /* AF_UNSPEC or AF_INET or AF_INET6 */
 static int IPv4or6 = AF_UNSPEC;  static int IPv4or6 = AF_UNSPEC;
   
 /* Set the routing domain a.k.a. VRF */  
 static int channel_rdomain = -1;  
   
 /* helper */  /* helper */
 static void port_open_helper(Channel *c, char *rtype);  static void port_open_helper(Channel *c, char *rtype);
   
Line 2442 
Line 2439 
         IPv4or6 = af;          IPv4or6 = af;
 }  }
   
 void  
 channel_set_rdomain(int rdomain)  
 {  
         channel_rdomain = rdomain;  
 }  
   
 static int  static int
 channel_setup_fwd_listener(int type, const char *listen_addr,  channel_setup_fwd_listener(int type, const char *listen_addr,
     u_short listen_port, int *allocated_listen_port,      u_short listen_port, int *allocated_listen_port,
Line 2556 
Line 2547 
                         continue;                          continue;
                 }                  }
                 /* Create a port to listen for the host. */                  /* Create a port to listen for the host. */
                 sock = socket_rdomain(ai->ai_family, ai->ai_socktype,                  sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
                     ai->ai_protocol, channel_rdomain);  
                 if (sock < 0) {                  if (sock < 0) {
                         /* this is no error since kernel may not support ipv6 */                          /* this is no error since kernel may not support ipv6 */
                         verbose("socket: %.100s", strerror(errno));                          verbose("socket: %.100s", strerror(errno));
Line 2890 
Line 2880 
                         error("connect_next: getnameinfo failed");                          error("connect_next: getnameinfo failed");
                         continue;                          continue;
                 }                  }
                 if ((sock = socket_rdomain(cctx->ai->ai_family,                  if ((sock = socket(cctx->ai->ai_family, cctx->ai->ai_socktype,
                     cctx->ai->ai_socktype, cctx->ai->ai_protocol,                      cctx->ai->ai_protocol)) == -1) {
                     channel_rdomain)) == -1) {  
                         if (cctx->ai->ai_next == NULL)                          if (cctx->ai->ai_next == NULL)
                                 error("socket: %.100s", strerror(errno));                                  error("socket: %.100s", strerror(errno));
                         else                          else
Line 3078 
Line 3067 
                 for (ai = aitop; ai; ai = ai->ai_next) {                  for (ai = aitop; ai; ai = ai->ai_next) {
                         if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)                          if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
                                 continue;                                  continue;
                         sock = socket_rdomain(ai->ai_family, ai->ai_socktype,                          sock = socket(ai->ai_family, ai->ai_socktype,
                             ai->ai_protocol, channel_rdomain);                              ai->ai_protocol);
                         if (sock < 0) {                          if (sock < 0) {
                                 error("socket: %.100s", strerror(errno));                                  error("socket: %.100s", strerror(errno));
                                 freeaddrinfo(aitop);                                  freeaddrinfo(aitop);
Line 3226 
Line 3215 
         }          }
         for (ai = aitop; ai; ai = ai->ai_next) {          for (ai = aitop; ai; ai = ai->ai_next) {
                 /* Create a socket. */                  /* Create a socket. */
                 sock = socket_rdomain(ai->ai_family, ai->ai_socktype,                  sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
                     ai->ai_protocol, channel_rdomain);  
                 if (sock < 0) {                  if (sock < 0) {
                         debug2("socket: %.100s", strerror(errno));                          debug2("socket: %.100s", strerror(errno));
                         continue;                          continue;

Legend:
Removed from v.1.299  
changed lines
  Added in v.1.300