Displaying 14 results from an estimated 14 matches for "ssh_gai_strerror".
2008 Feb 18
1
[PATCH] Build problem in current portable CVS
Hi,
I just tried to build the latest portable code from CVS on Cygwin.
I stumbled over a problem with the definitions of gai_strerror and
ssh_gai_strerror.
On systems not having gai_strerror, the fake-rfc2553.c file defines
its own version of gai_strerror, and fake-rfc2553.h additionally has
this definition of gai_strerror:
#define gai_strerror(a) (ssh_gai_strerror(a))
OTOH, misc.c defines the function ssh_gai_strerror unconditionally,
and...
2013 Jun 24
4
[Bug 2122] New: ssh: Could not resolve hostname nohost: Success
...configured properly, ssh shows a "Success"
error message:
/etc/nsswitch.conf:
hosts: files dns xyz
$ ssh nohost
ssh: Could not resolve hostname nohost: Success
The message "Success" doesn't make sense given that it'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 ==...
2012 Feb 12
0
PATCH: multiple BindAddress
...ily = 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, NULL, &hints, &res);
- if (gaierr) {
- error("getaddrinfo: %s: %s", options.bind_address,
- ssh_gai_strerror(gaierr));
- close(sock);
- return -1;
+ uint addrfound = 0;
+ uint last_idx = options.num_bind_address - 1; // last address index
+
+ verbose("Trying %d addresses to connect",options.num_bind_address);
+ for(i=0;i<options.num_bind_address;++i){
+
+ if (strncmp(options.bind_addresses...
2014 Jun 23
2
ListenAdress Exclusion
I was wondering what everyone's thoughts were on a simpler way to exclude
addresses from having listeners on them.
I know a lot of people have multiple subnets, especially larger
corporations.
Some networks are non-route-able, and therefor unsuitable for use with SSH,
aside from communication between other servers on the same subnet.
Given that we may want to exclude those non-route-able
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
2014 Jan 15
0
remote port forward failed because of failure resolving localhost to IP with error No such file or directory
...= IPv4or6;
3147 hints.ai_socktype = SOCK_STREAM;
3148 snprintf(strport, sizeof strport, "%d", port);
3149 if ((gaierr = getaddrinfo(host, strport, &hints, &cctx.aitop)) != 0) {
3150 error("connect_to %.100s: unknown host (%s)", host,
3151 ssh_gai_strerror(gaierr));
3152 return NULL;
3153 }
The error is returned by the function getaddrinfo. And it's "No such
file or directory". That is saying it can't find some file to resolve
localhost to IP. I found the error is only occurred on the x86_64 with
glibc 2.9.
Does anybo...
2012 Nov 24
0
ssh-keyscan continuity patch --
...: (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;
+ return s;
+ }
for (ai = aitop; ai; ai = ai->ai_next) {
s = socket(ai->ai_family, ai->ai_socktype, ai->ai_pro...
2012 May 08
1
About bug 640857
Hi, Dear OpenSSH support,
I'm writing to ask whether this bug is fixed in your openSSH 6.0. If no, do you have any plan?
https://bugzilla.redhat.com/show_bug.cgi?id=640857
Regards,
Carol
2009 Jul 09
0
[PATCH] Allow binding to a local port (OpenSSH 5.2)
...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;
}
if (bind(sock, res->ai_addr, res->ai_addrlen) < 0) {
- error("bind: %s: %s", options.bind_address, strerror(errno));
+ error("bind: %s port %s: %s",
+ options.bind_address? options.bind_address: "0.0.0.0",...
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
2011 Jul 17
2
openSSH 5.8p2 BindPort patch
...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));
2010 Nov 28
2
[PATCH] Use canonical hostname for DNS SSHFP lookup
...f(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 @@
fatal("%s: Could not resolve hostname %.100s: %s", __progname,
host, ssh_gai_strerror(gaierr));
+ if (canohost != NULL)
+ *canohost = xstrdup (aitop->ai_canonname);
+
for (attempt = 0; attempt < connection_attempts; attempt++) {
if (attempt > 0) {
/* Sleep a moment before retrying. */
@@ -1061,14 +1067,16 @@
/* returns 0 if key verifies or -1 if key does NOT...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...M;
snprintf(strport, sizeof strport, "%d", port);
- if ((gaierr = getaddrinfo(host, strport, &hints, &cctx.aitop)) != 0) {
+ if ((gaierr = getaddrinfo(host, strport, &hints, &cctx->aitop)) != 0) {
error("connect_to %.100s: unknown host (%s)", host,
ssh_gai_strerror(gaierr));
- return NULL;
+ return -1;
}
- cctx.host = xstrdup(host);
- cctx.port = port;
- cctx.ai = cctx.aitop;
+ cctx->host = xstrdup(host);
+ cctx->port = port;
+ cctx->ai = cctx->aitop;
- if ((sock = connect_next(&cctx)) == -1) {
+ if ((sock = connect_next(cctx)) == -1)...
2014 Feb 10
0
[PATCH] Basic SCTP support for OpenSSH client and server
...8c32..843ccd4 100644
--- 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) {
- deb...