[Pkg-privacy-commits] [onioncat] 123/340: * fragment buffer resynchronization enhanced * onioncat hosts file updated
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository onioncat.
commit 1efc0d467d8b1f3038083741737b3b5da1a9142b
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date: Wed Feb 18 10:21:17 2009 +0000
* fragment buffer resynchronization enhanced
* onioncat hosts file updated
git-svn-id: http://www.cypherpunk.at/svn/onioncat/trunk@435 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
ChangeLog | 1 +
configure | 24 +++++++++++------------
configure.ac | 2 +-
hosts.onioncat | 7 ++++---
src/ocat.c | 1 +
src/ocatroute.c | 9 +++++++--
src/ocatsocks.c | 61 +--------------------------------------------------------
7 files changed, 27 insertions(+), 78 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 86908a6..fe40805 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
* version 0.1.10
+ - fragment buffer resynchronization enhanced
- disabled connect log if unprivileged user -2 is used
- getpwnam() replaced by getpwnam_r() because valgrind reported an error
...but unfortunatelly it still does
diff --git a/configure b/configure
index d8a2018..efb1b87 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for onioncat 0.1.10-433M.
+# Generated by GNU Autoconf 2.61 for onioncat 0.1.10-434M.
#
# Report bugs to <rahra at cypherpunk.at>.
#
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='onioncat'
PACKAGE_TARNAME='onioncat'
-PACKAGE_VERSION='0.1.10-433M'
-PACKAGE_STRING='onioncat 0.1.10-433M'
+PACKAGE_VERSION='0.1.10-434M'
+PACKAGE_STRING='onioncat 0.1.10-434M'
PACKAGE_BUGREPORT='rahra at cypherpunk.at'
# Factoring default headers for most tests.
@@ -1206,7 +1206,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures onioncat 0.1.10-433M to adapt to many kinds of systems.
+\`configure' configures onioncat 0.1.10-434M to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1272,7 +1272,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of onioncat 0.1.10-433M:";;
+ short | recursive ) echo "Configuration of onioncat 0.1.10-434M:";;
esac
cat <<\_ACEOF
@@ -1362,7 +1362,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-onioncat configure 0.1.10-433M
+onioncat configure 0.1.10-434M
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1376,7 +1376,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by onioncat $as_me 0.1.10-433M, which was
+It was created by onioncat $as_me 0.1.10-434M, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2066,7 +2066,7 @@ fi
# Define the identity of the package.
PACKAGE='onioncat'
- VERSION='0.1.10-433M'
+ VERSION='0.1.10-434M'
cat >>confdefs.h <<_ACEOF
@@ -2217,11 +2217,11 @@ ac_config_headers="$ac_config_headers config.h"
cat >>confdefs.h <<\_ACEOF
-#define SVN_REVISION "433M"
+#define SVN_REVISION "434M"
_ACEOF
-CFLAGS=-Wall
+CFLAGS="-Wall -pthread -O2"
# Check whether --enable-debug was given.
@@ -5300,7 +5300,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by onioncat $as_me 0.1.10-433M, which was
+This file was extended by onioncat $as_me 0.1.10-434M, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5353,7 +5353,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-onioncat config.status 0.1.10-433M
+onioncat config.status 0.1.10-434M
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index 8a35908..1c322a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AC_CONFIG_HEADERS([config.h])
AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision])
-AC_SUBST([CFLAGS], [-Wall])
+AC_SUBST([CFLAGS], [["-Wall -pthread -O2"]])
AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [enable debugging]), AC_DEFINE([DEBUG], [], [enable debugging]))
AC_ARG_ENABLE([packet-log], AC_HELP_STRING([--enable-packet-log], [enable packet logging]), AC_DEFINE([PACKET_LOG], [], [enable packet logging]))
diff --git a/hosts.onioncat b/hosts.onioncat
index 80a6420..c295987 100644
--- a/hosts.onioncat
+++ b/hosts.onioncat
@@ -1,3 +1,4 @@
-fd87:d87e:eb43:f683:64ac:73f9:61ac:9a00 dot.onioncat
-fd87:d87e:eb43:2243:5f84:5b12:7bb5:bbc2 irc.onioncat
-fd87:d87e:eb43:f947:ad24:ec81:8abe:753e second.onioncat
+fd87:d87e:eb43:f683:64ac:73f9:61ac:9a00 62bwjldt7fq2zgqa.onion dot.dog
+fd87:d87e:eb43:2243:5f84:5b12:7bb5:bbc2 ejbv7bc3cj53lo6c.onion irc.onion.dog
+fd87:d87e:eb43:f947:ad24:ec81:8abe:753e 7fd22jhmqgfl45j6.onion ping.onion.dog
+fd87:d87e:eb43:affc:876f:5fbf:c506:46d0 v76io327x7cqmrwq.onion mail.onion.dog a.root-servers.dog
diff --git a/src/ocat.c b/src/ocat.c
index 1d2596f..ac827da 100644
--- a/src/ocat.c
+++ b/src/ocat.c
@@ -66,6 +66,7 @@ int open_logfile(void)
{
if (CNF(logfn))
{
+ log_debug("opening log file \"%s\"", CNF(logfn));
if ((CNF(logf) = fopen(CNF(logfn), "a")))
{
log_debug("logfile %s opened", CNF(logfn));
diff --git a/src/ocatroute.c b/src/ocatroute.c
index 3f628dc..5c791fc 100644
--- a/src/ocatroute.c
+++ b/src/ocatroute.c
@@ -444,13 +444,18 @@ void *socket_receiver(void *p)
}
else
{
+ /*
log_debug("fragment buffer reset");
peer->fraglen = 0;
+ */
+ log_debug("fragment buffer resynchronization");
+ len = 1;
+ drop = 1;
break;
}
// set IP address if it is not set yet and frame is valid
- if (IN6_IS_ADDR_UNSPECIFIED(&peer->addr))
+ if (!drop && IN6_IS_ADDR_UNSPECIFIED(&peer->addr))
{
if (*peer->tunhdr == CNF(fhd_key[IPV6_KEY]))
{
@@ -641,7 +646,7 @@ int create_listener(struct sockaddr *addr, int sock_len)
return -1;
}
- if (bind(fd, addr, sock_len) < 0)
+ if (bind(fd, addr, sock_len) == -1)
{
log_msg(LOG_EMERG, "could not bind listener %d: \"%s\"", fd, strerror(errno));
oe_close(fd);
diff --git a/src/ocatsocks.c b/src/ocatsocks.c
index 29d2a11..2967a3c 100644
--- a/src/ocatsocks.c
+++ b/src/ocatsocks.c
@@ -34,27 +34,7 @@ static int socks_thread_cnt_ = 0;
static pthread_mutex_t socks_queue_mutex_ = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t socks_queue_cond_ = PTHREAD_COND_INITIALIZER;
-#if 0
-int socks_srv_con(void)
-{
- int fd, t;
- char addr[INET6_ADDRSTRLEN];
- if ((fd = socket(CNF(socks_dst)->sin_family == AF_INET ? PF_INET : PF_INET6, SOCK_STREAM, 0)) < 0)
- return E_SOCKS_SOCK;
-
- t = time(NULL);
- if (connect(fd, (struct sockaddr*) CNF(socks_dst), SOCKADDR_SIZE(CNF(socks_dst))) == -1)
- {
- log_msg(LOG_ERR, "connect() to SOCKS port %s:%d failed: \"%s\". Sleeping for %d seconds.", inet_ntop(CNF(socks_dst)->sin_family, CNF(socks_dst)->sin_family == AF_INET ? (char*) &CNF(socks_dst)->sin_addr : (char*) &CNF(socks_dst6)->sin6_addr, addr, sizeof(addr)), ntohs(CNF(socks_dst)->sin_port), strerror(errno), TOR_SOCKS_CONN_TIMEOUT);
- oe_close(fd);
- sleep(TOR_SOCKS_CONN_TIMEOUT);
- return E_SOCKS_CONN;
- }
- log_debug("connected");
- return fd;
-}
-#else
int socks_srv_con(void)
{
int fd, t, maxfd, so_err;
@@ -121,19 +101,6 @@ int socks_srv_con(void)
continue;
}
- /*
- if (connect(fd, (struct sockaddr*) CNF(socks_dst), SOCKADDR_SIZE(CNF(socks_dst))) == -1)
- {
- log_msg(LOG_ERR, "connect() to SOCKS port %s:%d failed: \"%s\". Sleeping for %d seconds.",
- inet_ntop(CNF(socks_dst)->sin_family,
- CNF(socks_dst)->sin_family == AF_INET ? (char*) &CNF(socks_dst)->sin_addr : (char*) &CNF(socks_dst6)->sin6_addr, addr, sizeof(addr)),
- ntohs(CNF(socks_dst)->sin_port), strerror(errno), TOR_SOCKS_CONN_TIMEOUT);
- oe_close(fd);
- sleep(TOR_SOCKS_CONN_TIMEOUT);
- return E_SOCKS_CONN;
- }
- */
-
// test if connect() worked
log_debug("check socket error");
err_len = sizeof(so_err);
@@ -156,52 +123,26 @@ int socks_srv_con(void)
log_debug("connected");
return fd;
}
-#endif
int socks_connect(const SocksQueue_t *sq)
{
-// struct sockaddr_in in;
int fd, t, len;
char buf[FRAME_SIZE], onion[ONION_NAME_SIZE];
- //char addr[INET6_ADDRSTRLEN];
SocksHdr_t *shdr = (SocksHdr_t*) buf;
OcatPeer_t *peer;
int maxfd;
fd_set rset;
struct timeval tv;
- /*
- memset(&in, 0, sizeof(in));
- in.sin_family = AF_INET;
- in.sin_port = htons(CNF(tor_socks_port));
- in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
-#ifdef HAVE_SIN_LEN
- in.sin_len = sizeof(in);
-#endif
-*/
-
ipv6tonion(&sq->addr, onion);
strlcat(onion, ".onion", sizeof(onion));
log_msg(LOG_INFO, "trying to connect to \"%s\" [%s]", onion, inet_ntop(AF_INET6, &sq->addr, buf, FRAME_SIZE));
+ t = time(NULL);
if ((fd = socks_srv_con()) < 0)
return fd;
- /*
- if ((fd = socket(CNF(socks_dst)->sin_family == AF_INET ? PF_INET : PF_INET6, SOCK_STREAM, 0)) < 0)
- return E_SOCKS_SOCK;
-
- t = time(NULL);
- if (connect(fd, (struct sockaddr*) CNF(socks_dst), sizeof(struct sockaddr_in6)) == -1)
- {
- log_msg(LOG_ERR, "connect() to TOR's SOCKS port %s:%d failed: \"%s\". Sleeping for %d seconds.", inet_ntop(CNF(socks_dst)->sin_family, CNF(socks_dst)->sin_family == AF_INET ? (char*) &CNF(socks_dst)->sin_addr : (char*) &CNF(socks_dst6)->sin6_addr, addr, sizeof(addr)), ntohs(CNF(socks_dst)->sin_port), strerror(errno), TOR_SOCKS_CONN_TIMEOUT);
- oe_close(fd);
- sleep(TOR_SOCKS_CONN_TIMEOUT);
- return E_SOCKS_CONN;
- }
- */
-
log_debug("doing SOCKS4a handshake");
shdr->ver = 4;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git
More information about the Pkg-privacy-commits
mailing list