Displaying 20 results from an estimated 32 matches for "gaierr".
Did you mean:
gaier
2002 Feb 15
3
ssh can't resolve hostnames thru WINS
...x is on a mostly Windows-populated network.
Naturally, I set up Samba and added WINS as a name resolution option.
I found out that some programs now can use NetBIOS names, other can't.
openssh falls into latter category :-(
I found that openssh use this snippet to convert hostname to ip:
if((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
fatal("%s: %.100s: %s", __progname, host,
gai_strerror(gaierr));
and it fails for me exactly in this if() when I say "ssh <wins_name>".
OTOH, ping uses code similar to
struct hostent *hp;
hp = gethos...
2004 Apr 30
1
Code question (canohost.c)
...if (options.bind_address == NULL)
return sock;
memset(&hints, 0, sizeof(hints));
hints.ai_family = ai->ai_family;
hints.ai_socktype = ai->ai_socktype;
hints.ai_protocol = ai->ai_protocol;
hints.ai_flags = AI_PASSIVE;
gaierr = getaddrinfo(options.bind_address, "0", &hints, &res);
[..]
- Ben
2012 Feb 12
0
PATCH: multiple BindAddress
...PrivilegedPort
diff -rupN orig/openssh-5.9p1/sshconnect.c openssh-5.9p1/sshconnect.c
--- orig/openssh-5.9p1/sshconnect.c 2011-05-29 14:42:34.000000000 +0300
+++ openssh-5.9p1/sshconnect.c 2012-02-12 16:26:33.986132953 +0200
@@ -189,7 +189,7 @@ ssh_create_socket(int privileged, struct
{
int sock, gaierr;
struct addrinfo hints, *res;
-
+ uint i=0;
/*
* If we are running as root and want to connect to a privileged
* port, bind our own socket to a privileged port.
@@ -214,28 +214,61 @@ ssh_create_socket(int privileged, struct
fcntl(sock, F_SETFD, FD_CLOEXEC);
/* Bind the socket to an a...
2000 Jan 18
4
AIX- 'Host not found' in getaddrinfo("0.0.0.0", "22" , ...)
...elow work on other architectures?
Demo-Code built with values taken from a debug-session:
=======================================================
#include <stdio.h>
#include <sys/socket.h>
#include <netdb.h>
void main (void) {
struct addrinfo hints;
struct addrinfo *res;
int gaierr;
hints.ai_family = AF_UNSPEC;
hints.ai_flags = 0;
hints.ai_flags = 0;
hints.ai_family = 0;
hints.ai_socktype = 1; /* = SOCK_STREAM; */
hints.ai_protocol = 0;
hints.ai_addrlen = 0;
hints.ai_canonname = 0x0;
hints.ai_addr = 0x0;
hints.ai_next = 0x0;
gaierr = getaddrinfo("0.0.0.0", "2...
2013 Jun 24
4
[Bug 2122] New: ssh: Could not resolve hostname nohost: Success
...39;s in fact a
system error. It's an issue of ssh_gai_strerror() which can't handle a
situation when getaddrinfo() returns EAI_SYSTEM but errno is not set/is
set to 0.
A potential fix:
--- a/misc.c
+++ b/misc.c
@@ -127,7 +127,7 @@ unset_nonblock(int fd)
const char *
ssh_gai_strerror(int gaierr)
{
- if (gaierr == EAI_SYSTEM)
+ if (gaierr == EAI_SYSTEM && errno != 0)
return strerror(errno);
return gai_strerror(gaierr);
}
--
You are receiving this mail because:
You are watching the assignee of the bug.
2014 Jan 30
1
Announce: OpenSSH 6.5 released
Changes since OpenSSH 6.4
=========================
This is a feature-focused release.
New features:
* ssh(1), sshd(8): Add support for key exchange using elliptic-curve
Diffie Hellman in Daniel Bernstein's Curve25519. This key exchange
method is the default when both the client and server support it.
* ssh(1), sshd(8): Add support for Ed25519 as a public key type.
Ed25519 is a
2009 Jul 09
0
[PATCH] Allow binding to a local port (OpenSSH 5.2)
...f (options.bind_address == NULL)
+ if (options.bind_address == NULL && options.bind_port == NULL)
return sock;
memset(&hints, 0, sizeof(hints));
@@ -202,7 +202,7 @@
hints.ai_socktype = ai->ai_socktype;
hints.ai_protocol = ai->ai_protocol;
hints.ai_flags = AI_PASSIVE;
- gaierr = getaddrinfo(options.bind_address, NULL, &hints, &res);
+ gaierr = getaddrinfo(options.bind_address, options.bind_port, &hints, &res);
if (gaierr) {
error("getaddrinfo: %s: %s", options.bind_address,
ssh_gai_strerror(gaierr));
@@ -210,7 +210,10 @@
return -1...
2014 Jan 15
0
remote port forward failed because of failure resolving localhost to IP with error No such file or directory
...ost (No such file or directory)
debug1: failure forwarded-tcpip
The code relevant is here:
3133 /* Return CONNECTING channel to remote host, port */
3134 static Channel *
3135 connect_to(const char *host, u_short port, char *ctype, char *rname)
3136 {
3137 struct addrinfo hints;
3138 int gaierr;
3139 int sock = -1;
3140 char strport[NI_MAXSERV];
3141 struct channel_connect cctx;
3142 Channel *c;
3143
3144 memset(&cctx, 0, sizeof(cctx));
3145 memset(&hints, 0, sizeof(hints));
3146 hints.ai_family = IPv4or6;
3147 hints.ai_socktype = SOCK_STREAM;
3148...
2011 Jul 17
2
openSSH 5.8p2 BindPort patch
...tions.bind_address == NULL && options.bind_port == NULL)
return sock;
memset(&hints, 0, sizeof(hints));
@@ -222,7 +222,7 @@ ssh_create_socket(int privileged, struct
hints.ai_socktype = ai->ai_socktype;
hints.ai_protocol = ai->ai_protocol;
hints.ai_flags = AI_PASSIVE;
- gaierr = getaddrinfo(options.bind_address, NULL, &hints, &res);
+ gaierr = getaddrinfo(options.bind_address, options.bind_port, &hints, &res);
if (gaierr) {
error("getaddrinfo: %s: %s", options.bind_address,
ssh_gai_strerror(gaierr));
2002 Jul 17
2
[Patch] SSH through HTTP proxy using CONNECT
...REACHED */
+ }
+ options.proxy_server = xstrdup(buf);
break;
case 'D':
diff -ur -x CVS /usr/src/crypto/openssh/sshconnect.c src/sshconnect.c
--- /usr/src/crypto/openssh/sshconnect.c Thu Sep 27 18:33:35 2001
+++ src/sshconnect.c Wed Jul 17 16:14:44 2002
@@ -198,7 +198,9 @@
int gaierr;
int on = 1;
int sock = -1, attempt;
+ int connect_port;
char ntop[NI_MAXHOST], strport[NI_MAXSERV];
+ const char *connect_host;
struct addrinfo hints, *ai, *aitop;
struct linger linger;
struct servent *sp;
@@ -218,14 +220,21 @@
if (proxy_command != NULL)
return ssh_proxy_connect(h...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...= cctx->aitop = NULL;
}
-/* Return CONNECTING channel to remote host, port */
-static Channel *
-connect_to(const char *host, u_short port, char *ctype, char *rname)
+static int
+connect_to_helper(const char *host, u_short port, struct channel_connect *cctx)
{
struct addrinfo hints;
int gaierr;
int sock = -1;
char strport[NI_MAXSERV];
- struct channel_connect cctx;
- Channel *c;
- memset(&cctx, 0, sizeof(cctx));
+ memset(cctx, 0, sizeof(*cctx));
memset(&hints, 0, sizeof(hints));
hints.ai_family = IPv4or6;
hints.ai_socktype = SOCK_STREAM;
snprintf(strport, sizeof str...
2014 Feb 10
0
[PATCH] Basic SCTP support for OpenSSH client and server
...--- a/misc.c
+++ b/misc.c
@@ -42,6 +42,9 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
+#ifdef USE_SCTP
+# include <netinet/sctp.h>
+#endif
#include <ctype.h>
#include <errno.h>
@@ -134,25 +137,42 @@ ssh_gai_strerror(int gaierr)
}
/* disable nagle on socket */
-void
-set_nodelay(int fd)
+static int
+set_nodelay_proto(int fd, int proto, int optno, const char *pname)
{
int opt;
socklen_t optlen;
optlen = sizeof opt;
- if (getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &opt, &optlen) == -1) {
- debug("ge...
2012 Nov 24
0
ssh-keyscan continuity patch --
...ble_compat20();
myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = c->c_keytype == KT_DSA?
"ssh-dss" : (c->c_keytype == KT_RSA ? "ssh-rsa" :
@@ -296,8 +318,11 @@
memset(&hints, 0, sizeof(hints));
hints.ai_family = IPv4or6;
hints.ai_socktype = SOCK_STREAM;
- if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
- fatal("getaddrinfo %s: %s", host, ssh_gai_strerror(gaierr));
+ if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) {
+ error("getaddrinfo %s: %s", host, ssh_gai_strerror(gaierr));
+ s = -1;
+ r...
2013 Oct 07
4
Feature request: FQDN Host match
Hello!
I'm hoping that Gmail won't HTML format this mail so that I'll get flamed :)
Anyway, my question relates to ssh_config. The problem I find is that
the Host pattern is only applied to the argument given on the command
line, as outlined in the man page:
"The host is the hostname argument given on the command line (i.e. the
name is not converted to a canonicalized host name
2001 Dec 05
1
DISPLAY=localhost
...-1 if
+ * an error occurs.
*/
-char *
-x11_create_display_inet(int screen_number, int x11_display_offset)
+int
+x11_create_display_inet(int x11_display_offset, int gateway_ports)
{
int display_number, sock;
u_short port;
struct addrinfo hints, *ai, *aitop;
char strport[NI_MAXSERV];
int gaierr, n, num_socks = 0, socks[NUM_SOCKS];
- char display[512];
- char hostname[MAXHOSTNAMELEN];
for (display_number = x11_display_offset;
display_number < MAX_DISPLAYS;
@@ -2416,12 +2414,12 @@
port = 6000 + display_number;
memset(&hints, 0, sizeof(hints));
hints.ai_family = IPv...
2001 Mar 13
0
[PATCH] openssh 2.5.1p2 TIS authserv support
...Authentication },
{ "challengeresponseauthentication", sChallengeResponseAuthentication },
@@ -299,6 +308,34 @@
return sBadOption;
}
+#ifdef TIS_AUTH
+void
+add_authserv_addr(ServerOptions *options, char **addr)
+{
+ struct addrinfo hints, *ai, *aitop;
+ char *host, *service;
+ int gaierr;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = IPv4or6;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0;
+
+ host = strdelim(addr);
+ service = strdelim(addr);
+
+ if ((gaierr = getaddrinfo(host, service, &hints, &aitop)) != 0)
+ fata...
2010 Nov 28
2
[PATCH] Use canonical hostname for DNS SSHFP lookup
...h_connect(const char *host, struct sockaddr_storage * hostaddr,
u_short port, int family, int connection_attempts, int *timeout_ms,
- int want_keepalive, int needpriv, const char *proxy_command)
+ int want_keepalive, int needpriv, const char *proxy_command,
+ char **canohost)
{
int gaierr;
int on = 1;
@@ -352,6 +353,8 @@
/* No proxy command. */
memset(&hints, 0, sizeof(hints));
+ if (canohost != NULL)
+ hints.ai_flags = AI_CANONNAME;
hints.ai_family = family;
hints.ai_socktype = SOCK_STREAM;
snprintf(strport, sizeof strport, "%u", port);
@@ -359,6 +362,9...
2000 Dec 07
1
[PATCH] tis authserv support
...;checkmail", sCheckMail },
{ "listenaddress", sListenAddress },
@@ -277,6 +289,35 @@
return sBadOption;
}
+#ifdef TIS_AUTH
+void
+add_authserv_addr(ServerOptions *options, char **addr)
+{
+ extern int IPv4or6;
+ struct addrinfo hints, *ai, *aitop;
+ char *host, *service;
+ int gaierr;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = IPv4or6;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0;
+
+ host = strdelim(addr);
+ service = strdelim(addr);
+
+ if ((gaierr = getaddrinfo(host, service, &hints, &aitop)) != 0)
+ fata...
2002 May 22
0
[PATCH] connect() timeout
...7 +298,7 @@
*/
int
ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
- u_short port, int family, int connection_attempts,
+ u_short port, int family, int connection_attempts, int connection_timeout,
int anonymous, struct passwd *pw, const char *proxy_command)
{
int gaierr;
@@ -323,7 +380,8 @@
* the remote uid as root.
*/
temporarily_use_uid(pw);
- if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) {
+ if (timeout_connect(sock, ai->ai_addr, ai->ai_addrlen,
+ connection_timeout) >= 0) {
/* Successful connection. */
m...
2001 May 14
2
openssh-2.9p1
Hi,
1. I think you should apply the attached patch to openssh-2.9p1,
otherwise ssh-keyscan on linux boxes with glibc-2.1 will experience enormous
timeout delays.
2. Is there a program like ssh-keyscan for the Version2 (dsa and rsa) keys??
regards
Peter Breitenlohner <peb at mppmu.mpg.de>
-------------- next part --------------
diff -ur openssh-2.9p1.orig/ssh-keyscan.c