Axel Christiansen | 14 May 2006 18:57

compile cvs trunk

Hello,

should the cvs trunk compile?

a configure first gave me errors. I had to replace
any appearance of "[config.h]" to config.h in the
Makefile.

Then a make did not finish:

make[2]: Entering directory `/usr/src/tinc/lib'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/tinc/lib'
Making all in src
make[2]: Entering directory `/usr/src/tinc/src'
gcc -g -O2 -DCONFDIR=\"/usr/local/etc\" 
-DLOCALEDIR=\"/usr/local/share/locale\" 
-DLOCALSTATEDIR=\"/usr/local/var\" -g -O2  -o tincd  conf.o connection.o 
edge.o event.o graph.o logger.o meta.o net.o net_packet.o net_setup.o 
net_socket.o netutl.o node.o process.o protocol.o protocol_auth.o 
protocol_edge.o protocol_misc.o protocol_key.o protocol_subnet.o route.o 
subnet.o tincd.o ../lib/libvpn.a -lcrypto -lz -llzo
graph.o: In function `sssp_bfs':/usr/src/tinc/src/graph.c:278: undefined 
reference to `device'

...

tincd.o: In function `main':/usr/src/tinc/src/tincd.c:504: undefined 
reference to `dump_device_stats'
collect2: ld returned 1 exit status
(Continue reading)

Gaël Roualland | 18 May 2006 00:38
Picon

Finding the right interface on FreeBSD

Hello,

The code in tinc for BSD device has no way to handle the fact that
several tun devices are already used., since it always try to open the
specified device which might already be in use.

The following patch makes it try to open the various available tun
devices before giving up.

Hope that helps,

--

-- 
Gaël Roualland -+- gael.roualland@...
diff -ru tinc-1.0.4/src/bsd/device.c tinc-1.0.4.gr/src/bsd/device.c
--- tinc-1.0.4/src/bsd/device.c	Wed May  4 18:57:55 2005
+++ tinc-1.0.4.gr/src/bsd/device.c	Wed May 17 22:47:27 2006
 <at>  <at>  -38,6 +38,10  <at>  <at> 

 int device_fd = -1;
 char *device;
+
+static char device_buf[256];
+#define DEVICE_TRIES_MAX 255
+
 char *iface;
 char *device_info;
 static int device_total_in = 0;
 <at>  <at>  -60,8 +64,31  <at>  <at> 
(Continue reading)

Gaël Roualland | 18 May 2006 00:43

Random crashes after sighup

Hello,

I noticed some random crashes after sending SIGHUP to the daemon
(especially when some connections are continually failling).
Playing around with gdb, it seems that after SIGHUP, all the "outgoing"
information of the connections is being cleared, but later on it is
being used in other places while still equal to NULL.

The attached patch tries to fix this by avoiding these conditions. It
works for me, although it might not be the best way to fix it, since I'm
not yet very familiar with tinc's data structures.

Regards,

--

-- 
Gaël Roualland -+- gael.roualland@...
diff -ru tinc-1.0.4/src/net.c tinc-1.0.4.gr/src/net.c
--- tinc-1.0.4/src/net.c	Wed May  4 20:09:37 2005
+++ tinc-1.0.4.gr/src/net.c	Wed May 17 23:02:38 2006
 <at>  <at>  -248,7 +248,7  <at>  <at> 
 				}
 				ifdebug(CONNECTIONS) logger(LOG_WARNING, _("Timeout from %s (%s) during authentication"),
 						   c->name, c->hostname);
-				if(c->status.connecting) {
+				if(c->status.connecting && c->outgoing) {
 					c->status.connecting = false;
 					closesocket(c->socket);
 					do_outgoing_connection(c);
(Continue reading)


Gmane