[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.333 and 1.334

version 1.333, 2014/06/27 16:41:56 version 1.334, 2014/07/03 22:33:41
Line 2676 
Line 2676 
  * "0.0.0.0"               -> wildcard v4/v6 if SSH_OLD_FORWARD_ADDR   * "0.0.0.0"               -> wildcard v4/v6 if SSH_OLD_FORWARD_ADDR
  * "" (empty string), "*"  -> wildcard v4/v6   * "" (empty string), "*"  -> wildcard v4/v6
  * "localhost"             -> loopback v4/v6   * "localhost"             -> loopback v4/v6
    * "127.0.0.1" / "::1"     -> accepted even if gateway_ports isn't set
  */   */
 static const char *  static const char *
 channel_fwd_bind_addr(const char *listen_addr, int *wildcardp,  channel_fwd_bind_addr(const char *listen_addr, int *wildcardp,
Line 2705 
Line 2706 
                                     "\"%s\" overridden by server "                                      "\"%s\" overridden by server "
                                     "GatewayPorts", listen_addr);                                      "GatewayPorts", listen_addr);
                         }                          }
                 }                  } else if (strcmp(listen_addr, "localhost") != 0 ||
                 else if (strcmp(listen_addr, "localhost") != 0)                      strcmp(listen_addr, "127.0.0.1") == 0 ||
                       strcmp(listen_addr, "::1") == 0) {
                           /* Accept localhost address when GatewayPorts=yes */
                         addr = listen_addr;                          addr = listen_addr;
                   }
           } else if (strcmp(listen_addr, "127.0.0.1") == 0 ||
               strcmp(listen_addr, "::1") == 0) {
                   /*
                    * If a specific IPv4/IPv6 localhost address has been
                    * requested then accept it even if gateway_ports is in
                    * effect. This allows the client to prefer IPv4 or IPv6.
                    */
                   addr = listen_addr;
         }          }
         if (wildcardp != NULL)          if (wildcardp != NULL)
                 *wildcardp = wildcard;                  *wildcardp = wildcard;

Legend:
Removed from v.1.333  
changed lines
  Added in v.1.334