View | Details | Raw Unified | Return to bug 2286 | Differences between
and this patch

Collapse All | Expand All

(-)sshconnect.c (-2 / +6 lines)
Lines 442-450 Link Here
442
		 * sequence until the connection succeeds.
442
		 * sequence until the connection succeeds.
443
		 */
443
		 */
444
		for (ai = aitop; ai; ai = ai->ai_next) {
444
		for (ai = aitop; ai; ai = ai->ai_next) {
445
			if (ai->ai_family != AF_INET &&
445
			if (ai->ai_family == AF_INET)
446
			    ai->ai_family != AF_INET6)
446
				((struct sockaddr_in *)ai->ai_addr)->sin_port = htons(port);
447
			else if (ai->ai_family == AF_INET6)
448
				((struct sockaddr_in6 *)ai->ai_addr)->sin6_port = htons(port);
449
			else
447
				continue;
450
				continue;
451
448
			if (getnameinfo(ai->ai_addr, ai->ai_addrlen,
452
			if (getnameinfo(ai->ai_addr, ai->ai_addrlen,
449
			    ntop, sizeof(ntop), strport, sizeof(strport),
453
			    ntop, sizeof(ntop), strport, sizeof(strport),
450
			    NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
454
			    NI_NUMERICHOST|NI_NUMERICSERV) != 0) {

Return to bug 2286