Displaying 20 results from an estimated 70 matches for "ai_addr".
Did you mean:
a_addr
2017 Jan 12
3
proposed change to ssh_connect_direct()
On Sat, Jan 7, 2017 at 2:30 PM, Peter Moody <mindrot at hda3.com> wrote:
> so I spent a bit of time looking at this and it seems like the only
> way to go, at least if I want to keep it in ssh_connect_direct(), is
> to use pthreads. further, it seems like getting that accepted is
> something of a long shot:
Sorry, pthreads is a non-starter.
I would have thought that using
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
2001 Feb 17
2
Important fix (sshd && binding). Portable version only.
...c openssh-2.3.0p1/sshd.c
--- openssh-2.3.0p1.org/sshd.c Sat Jan 6 19:54:11 2001
+++ openssh-2.3.0p1/sshd.c Sat Jan 6 19:55:48 2001
@@ -782,10 +782,10 @@
debug("Bind to port %s on %s.", strport, ntop);
/* Bind the socket to the desired port. */
- if ((bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) &&
- (!ai->ai_next)) {
- error("Bind to port %s on %s failed: %.200s.",
- strport, ntop, strerror(errno));
+ if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
+ if (!ai->ai_next)
+ error("Bind to por...
2008 Jan 14
1
[LLVMdev] Opaque type
...use I did not understand
how to use.
So, the java code is:
int[] ai;
....
ai = new int[1];
I am using LLVM API in this way:
//I create a pointer of Opaque type, because I don't know yet the array size!
OpaqueType* ot = OpaqueType::get();
AllocaInst* ptr_addrOP = new AllocaInst(ot, "ai_addr", label_entry);
//I create pointer of Array type when it is initialized
ArrayType* art = ArrayType::get(Type::IntTy, 1);
AllocaInst* ptr_addrAr = new AllocaInst(art, "ai_addr", label_entry);
//I try to make concrete the abstract pointer
((PointerType*)ptr_addrOP -> getType()) -&...
2000 Jun 06
0
connection timeout
...is host, and try each one in
sequence until the connection succeeds. */
for (ai = aitop; ai; ai = ai->ai_next) {
+ fd_set ourset;
+ struct timeval timeout;
+
if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
continue;
if (getnameinfo(ai->ai_addr, ai->ai_addrlen,
@@ -253,7 +258,15 @@
* the remote uid as root.
*/
temporarily_use_uid(original_real_uid);
- if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) {
+ fcntl(sock, F_SETFL, O_NONBLOCK);
+ FD_ZERO(&ourset);
+ FD_SET(sock, &ourset);
+ timeout....
2011 Aug 05
4
[Bug 8355] New: Use pointer after freeaddrinfo()
https://bugzilla.samba.org/show_bug.cgi?id=8355
Summary: Use pointer after freeaddrinfo()
Product: rsync
Version: 3.0.8
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: andrey at zonov.org
2004 Feb 25
3
[patch] Correct configure test for sin_len to compile on Tru64 Unix
The last versions of rsync fail to compile on Tru64 Unix (alpha),
because of a typo in configure.in.
The problem is that the code in configure check for sockaddr.sa_len,
while the code uses sockaddr.sin_len. This patch fixes the problem.
Please include it in the next version of rsync.
diff -ur src-2.6.0/configure.in src-2.6.0-local/configure.in
--- src-2.6.0-local/configure.in
2002 Jan 11
1
rsync 2.5.1 server - strange logs
I've just upgraded my rsync server to 2.5.1 (before, I was using 2.4.6),
without changing anything in /etc/rsyncd.conf, and now, I have this logs
each time a client connect to server:
2002/01/07 18:33:03 [10432] rsync: reverse name lookup mismatch on fd3 - spoofed address?
2002/01/07 18:33:03 [10432] rsync on admin/sbin/padmin_update.sh from UNKNOWN (172.16.65.14)
2002/01/07 18:33:03 [10432]
2002 May 22
0
[PATCH] connect() timeout
...onnection_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. */
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
restore_uid();
--- openssh-3.2.2p1/sshconnect.h.ORIG Wed Oct 10 07:07...
2002 Nov 05
2
2.5.6 release
On Tue, Nov 05, 2002 at 08:37:00AM -0800, Martin Pool wrote:
> On 10 Oct 2002, "Green, Paul" <Paul.Green@stratus.com> wrote:
> > No new CVS messages have appeared on the rsync-cvs archives since August
> > 30th. This seems rather odd-- perhaps a daemon stopped working? If there
> > has truly been no activity since that date, I apologize for
> >
2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...ION_ATTEMPT_DELAY)))
+ /* Do not initiate new connections yet */
return 0;
- } else if (errno != EINPROGRESS)
+ if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) {
+ errno = EAFNOSUPPORT;
return -1;
-
- if (waitrfd(sockfd, timeoutp) == -1)
+ }
+ if (getnameinfo(ai->ai_addr, ai->ai_addrlen,
+ ntop, sizeof(ntop),
+ strport, sizeof(strport),
+ NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
+ oerrno = errno;
+ error("%s: getnameinfo failed", __func__);
+ errno = oerrno;
return -1;
-
- /* Completed or failed */
- if (getsockopt(sockfd, SOL_SOCKET, SO_ERRO...
2002 Jan 26
5
[PATCH] Connect timeout
...onnection_attempts,
+ u_short port, int family, int connection_attempts, int connection_timeout,
int anonymous, struct passwd *pw, const char *proxy_command)
{
int gaierr;
@@ -322,7 +361,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. */
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
restore_uid();
--- sshconnect.h.OK Wed Oct 10 07:07:45 2001
+++ sshco...
2004 Apr 01
1
[patch] net/rsync: problems in client name lookup code
...AM;
+
+ err = getaddrinfo(addr, NULL, &hint, &answer);
+ if (err) {
+ rprintf(FERROR, RSYNC_NAME ": malformed address %s: %s\n",
+ addr, gai_strerror(err));
+ return name_buf;
}
+ switch (answer->ai_family) {
+ case AF_INET:
+ memcpy(&ss, answer->ai_addr, sizeof(struct sockaddr_in));
+ break;
+#ifdef INET6
+ case AF_INET6:
+ memcpy(&ss, answer->ai_addr, sizeof(struct sockaddr_in6));
+ break;
+ }
+#endif
+ freeaddrinfo(answer);
} else {
- ss_len = sizeof ss;
- ssp = &ss;
+ socklen_t ss_len = sizeof ss;
client_sockaddr(f...
2010 Nov 28
2
[PATCH] Use canonical hostname for DNS SSHFP lookup
...ai) + sizeof(struct sockaddr_in));
+ if (canonname != NULL) {
+ canonlen = strlen (canonname);
+ len += canonlen + 1;
+ }
+
+ ai = malloc(len);
if (ai == NULL)
return (NULL);
- memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in));
+ memset(ai, '\0', len);
ai->ai_addr = (struct sockaddr *)(ai + 1);
/* XXX -- ssh doesn't use sa_len */
@@ -138,6 +146,11 @@
((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
+
+ if (canonname != NULL) {
+ ai->ai_canonname = ((char *)ai-&g...
2001 Nov 17
0
[PATCH] Connect timeout
...onnection_attempts,
+ u_short port, int family, int connection_attempts, int connection_timeout,
int anonymous, struct passwd *pw, const char *proxy_command)
{
int gaierr;
@@ -322,7 +361,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. */
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
restore_uid();
--- openssh-3.0.1p1/sshconnect.h.ORIG Sat Nov 17 22:49...
2003 Apr 15
0
Connect timeout patch
...u_short port, int family, int connection_attempts,
+ u_short port, int family, int connection_attempts, int connection_timeout,
int needpriv, const char *proxy_command)
{
int gaierr;
@@ -300,7 +355,8 @@
/* Any error is already output */
continue;
- 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. */
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
break;
--- openssh-3.6.1p1/sshconnect.h.ORIG Tue Apr 15 23:06:30 2003...
2002 Apr 03
1
[PATCH] connect() timeout
...onnection_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 +381,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. */
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
restore_uid();
--- openssh-3.1p1/sshconnect.h.ORIG Wed Oct 10 07:07:4...
2002 Oct 17
0
[PATCH] connect() timeout for OpenSSH-3.5p1
...u_short port, int family, int connection_attempts,
+ u_short port, int family, int connection_attempts, int connection_timeout,
int needpriv, const char *proxy_command)
{
int gaierr;
@@ -300,7 +355,8 @@
/* Any error is already output */
continue;
- 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. */
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
break;
--- openssh-3.5p1/sshconnect.h.ORIG Fri Jun 21 02:41:53 2002
+...
2001 Oct 02
1
Probably broken getaddrinfo() on Solaris x86.
...blem with the latest version (2.9.9p2) and previous
versions of OpenSSH when using portforwarding und Solaris 8 x86.
It seems like the getaddrinfo() function on Solaris 8 x86 is somehow broken,
instead of binding a port to 127.0.0.1, OpenSSH tried to bind it to
1.0.0.127 (1.0.0.127 was the ai->ai_addr returned by getaddrinfo() in
channel.c).
I could not reproduce this on Solaris 8 Sparc and I assume that Sun
developers mixed endianess on the x86 platform.
I could fix the problem by marking the getaddrinfo() function as broken
on Solaris 8 x86 (#define BROKEN_GETADDRINFO 1).
Maybe someone o...
2002 Oct 30
1
connect() timeout patch.
...efused" (which
* should block fallback to rsh and similar), or did we get at least
@@ -299,9 +301,11 @@
if (sock < 0)
/* Any error is already output */
continue;
-
+ sigfunc = (int)signal(SIGALRM,(void *) timeout);
+ alarm(options.time_out);
if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) {
/* Successful connection. */
+ alarm(0);
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
break;
} else {
@@ -924,3 +928,18 @@
}
return (found);
}
+
+void
+timeout(void)
+{
+ /* Return to here if we get a time out after so many seconds...