Cleanups.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 14 May 2000 12:22:42 +0000 (12:22 +0000)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 14 May 2000 12:22:42 +0000 (12:22 +0000)
19 files changed:
AUTHORS
README
THANKS
cipher/cipher.c
cipher/cipher.h
doc/tinc.conf.5
doc/tinc.texi
src/conf.c
src/conf.h
src/encr.c
src/encr.h
src/genauth.c
src/net.c
src/net.h
src/netutl.c
src/netutl.h
src/protocol.c
src/protocol.h
src/tincd.c

diff --git a/AUTHORS b/AUTHORS
index 17b18bada393cb201612782bf208548aa41f2fb0..aa39942e613aeccbd574b07e4cfb07c6242727ad 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,5 +5,5 @@ Ivo Timmermans <itimmermans@bigfoot.com>
 These files are from other sources:
  * lib/pidfile.h and lib/pidfile.c are by Martin Schulze, taken from
  the syslog 1.3 sources.
 These files are from other sources:
  * lib/pidfile.h and lib/pidfile.c are by Martin Schulze, taken from
  the syslog 1.3 sources.
- * The files cipher/blowfish/ and cipher/idea/ are from the SSLeay
package by Eric Young.
+ * The files in cipher/blowfish/ are from the SSLeay package by
+ Eric Young.
diff --git a/README b/README
index bb768a44062d7bc49264621c16137a5ffe886853..d368fc88f90b3369ae26134d396b0b8f68ab6c87 100644 (file)
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 This is the README file for tinc version 1.0.
 Installation instructions may be found in the INSTALL file.
 
 This is the README file for tinc version 1.0.
 Installation instructions may be found in the INSTALL file.
 
-tinc is Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com> and
+tinc is Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com> and
 others. For a complete list of authors see the AUTHORS file.
 This product includes software developed by Eric Young (eay@mincom.oz.au)
 
 others. For a complete list of authors see the AUTHORS file.
 This product includes software developed by Eric Young (eay@mincom.oz.au)
 
@@ -18,7 +18,11 @@ do this, configure will (hopefully) mention it to you.
 This version of tinc supports multiple virtual networks at once. To
 use this feature, you may supply a netname via the -n or --net
 options. The standard locations for the config files will then be
 This version of tinc supports multiple virtual networks at once. To
 use this feature, you may supply a netname via the -n or --net
 options. The standard locations for the config files will then be
-/etc/tinc/<net>/.
+/etc/tinc/<net>/. Because of this feature, tinc will send packets
+directly to their destinations, instead of to the uplink. If this
+behaviour is undesirable (for instance because of firewalls or
+other restrictions), please use an older version of tinc (I would
+recommend tinc-0.2.19).
 
 In this version, MAC addresses are stripped off before encoding and
 sending a packet. When the packet reaches its destination, the MAC
 
 In this version, MAC addresses are stripped off before encoding and
 sending a packet. When the packet reaches its destination, the MAC
diff --git a/THANKS b/THANKS
index 0af66b6f813d632d5be8659d1cede215268e38ee..fceb3fd35b6ac3cce133fd5c1f473aa5285e1521 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -12,7 +12,7 @@ I would like to thank
  * Sander Smeenk
  * Tijs van Bakel
  * Wessel Dankers (for the name `tinc' and being a royal pain in the
  * Sander Smeenk
  * Tijs van Bakel
  * Wessel Dankers (for the name `tinc' and being a royal pain in the
-ass (je hebt erom gevraagd))
+   ass (je hebt erom gevraagd))
 
 for their help, support and ideas. Thank you guys!
 
 
 for their help, support and ideas. Thank you guys!
 
index afe173ad625f53267aff5887561568e9f7f44edc..c504b7e76c618891a9a6988ac10e6c701fd595c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
     cipher.c -- wrapper functions for encryption algorithms
 /*
     cipher.c -- wrapper functions for encryption algorithms
-    Copyright (C) 1999 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index 647dcab0f2a3b963d38c246be9821bc3af08036d..d5897e3d4384da760f0c8b49f276d3d093886572 100644 (file)
@@ -1,6 +1,6 @@
 /*
     cipher.c -- header file for cipher.c
 /*
     cipher.c -- header file for cipher.c
-    Copyright (C) 1999 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index d6d8f5047ebb5461da96ca8c8095cc713b1080db..e456df661c489724de64238d8dc7558025154ede 100644 (file)
@@ -1,4 +1,4 @@
-.TH TINC 5 "March 1999" "tinc version 0.2.16" "FSF"
+.TH TINC 5 "May 2000" "tinc version 1.0" "FSF"
 .SH NAME
 tincd.conf \- tinc daemon configuration
 .SH "DESCRIPTION"
 .SH NAME
 tincd.conf \- tinc daemon configuration
 .SH "DESCRIPTION"
index dea5a9b0c6fb305823d269e7f5ac64abf44e285c..fdcbf45cf2c75c2cba7884d74ce9e60c9cb97a96 100644 (file)
@@ -12,7 +12,7 @@
 
 This is the info manual for tinc, a Virtual Private Network daemon.
 
 
 This is the info manual for tinc, a Virtual Private Network daemon.
 
-Copyright 1998 Ivo Timmermans <itimmermans@@bigfoot.com>
+Copyright 1998,199,2000 Ivo Timmermans <itimmermans@@bigfoot.com>
 
      Permission is granted to make and distribute verbatim
      copies of this manual provided the copyright notice and
 
      Permission is granted to make and distribute verbatim
      copies of this manual provided the copyright notice and
@@ -34,7 +34,7 @@ Copyright 1998 Ivo Timmermans <itimmermans@@bigfoot.com>
 
 @page
 @vskip 0pt plus 1filll
 
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1998 Ivo Timmermans <itimmermans@@bigfoot.com>
+Copyright @copyright{} 1998,1999,2000 Ivo Timmermans <itimmermans@@bigfoot.com>
 
      Permission is granted to make and distribute verbatim
      copies of this manual provided the copyright notice and
 
      Permission is granted to make and distribute verbatim
      copies of this manual provided the copyright notice and
@@ -765,6 +765,13 @@ have two connections, we also have two protocols. The protocol used for
 the UDP data is the ``data-protocol,'' the other one is the
 ``meta-protocol.''
 
 the UDP data is the ``data-protocol,'' the other one is the
 ``meta-protocol.''
 
+The reason we don't use TCP for both protocols is that UDP is much
+better for encapsulation, even while it is less reliable. The real
+problem is that when TCP would be used to encapsulate a TCP stream
+that's on the private network, for every packet sent there would be
+three ACK's sent instead of just one. Furthermore, if there would be
+a timeout, both TCP streams would sense the timeout, and both would
+start resending packets.
 
 @c ==================================================================
 @node    Security,  , The Connection, Technical information
 
 @c ==================================================================
 @node    Security,  , The Connection, Technical information
index 6f949f560c1d8be6c1d3183e509761be2efe7260..146a582c9885e7c3856100d6c9c9a71af55d41ce 100644 (file)
@@ -1,7 +1,7 @@
 /*
     conf.c -- configuration code
     Copyright (C) 1998 Emphyrio,
 /*
     conf.c -- configuration code
     Copyright (C) 1998 Emphyrio,
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -18,9 +18,6 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-/* foute config read code, GPL, emphyrio 1998 */
-/* Mutilated by me -- Ivo */
-
 #include "config.h"
 
 #include <ctype.h>
 #include "config.h"
 
 #include <ctype.h>
@@ -49,7 +46,7 @@ typedef struct internal_config_t {
   These are all the possible configurable values
 */
 static internal_config_t hazahaza[] = {
   These are all the possible configurable values
 */
 static internal_config_t hazahaza[] = {
-  { "AllowConnect", allowconnect,   TYPE_BOOL },
+  { "AllowConnect", allowconnect,   TYPE_BOOL },   /* Is not used anywhere. Remove? */
   { "ConnectTo",    upstreamip,     TYPE_IP },
   { "ConnectPort",  upstreamport,   TYPE_INT },
   { "ListenPort",   listenport,     TYPE_INT },
   { "ConnectTo",    upstreamip,     TYPE_IP },
   { "ConnectPort",  upstreamport,   TYPE_INT },
   { "ListenPort",   listenport,     TYPE_INT },
@@ -200,4 +197,3 @@ get_config_val(which_t type)
   /* Not found */
   return NULL;
 }
   /* Not found */
   return NULL;
 }
-
index 0d66313b9830a233b50866271b6edabbc2f8a88b..de74c9f897fb4ed35c8b88805d69ce89a26fef24 100644 (file)
@@ -1,6 +1,6 @@
 /*
     conf.h -- header for conf.c
 /*
     conf.h -- header for conf.c
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index cde6a991b195650c14be0669776851174bdfd9aa..a2e55312f8b6681bb220e6cf6df858bc11a07ee5 100644 (file)
@@ -1,6 +1,6 @@
 /*
     encr.c -- everything that deals with encryption
 /*
     encr.c -- everything that deals with encryption
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -345,7 +345,7 @@ void regenerate_keys(void)
 cp
   generate_private_key();
   calculate_public_key();
 cp
   generate_private_key();
   calculate_public_key();
-  send_key_changed2();
+  send_key_changed_all();
   recalculate_encryption_keys();
 cp
 }
   recalculate_encryption_keys();
 cp
 }
index c2cc1324a9b99c308915745ba12dee49cb006081..227c2c8cc3237a9afb74a89a074852b76e5f09a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
     encr.h -- header for encr.c
 /*
     encr.h -- header for encr.c
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index 7e154e35c1a1228dde6ed69c46c200547ff2eecc..b727eb6eb551aa6c553eb0ae4b10d43a4159861f 100644 (file)
@@ -1,6 +1,6 @@
 /*
     genauth.c -- generate a random passphrase
 /*
     genauth.c -- generate a random passphrase
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index 7b9133e0c02d005761300fa24a4bcf03fa8ae1b6..dc632b608f457defcdde384a6c27b24021233a34 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -1,6 +1,6 @@
 /*
     net.c -- most of the network code
 /*
     net.c -- most of the network code
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -304,21 +304,6 @@ cp
   return xsend(cl, packet);
 }
 
   return xsend(cl, packet);
 }
 
-int send_broadcast(conn_list_t *cl, vpn_packet_t *packet)
-{
-  conn_list_t *p;
-cp
-  for(p = cl; p != NULL; p = p->next)
-    if(send_packet(p->real_ip, packet) < 0)
-      {
-       syslog(LOG_ERR, "Could not send a broadcast packet to %08lx (%08lx): %m",
-              p->vpn_ip, p->real_ip);
-       break; /* FIXME: should retry later, and send a ping over the metaconnection. */
-      }
-cp
-  return 0;
-}
-
 /*
   open the local ethertap device
 */
 /*
   open the local ethertap device
 */
index 830fe43a547ee44214cc55560f60afbe9013404a..8e067475f2c09e44eff3f138e944522a10202c6f 100644 (file)
--- a/src/net.h
+++ b/src/net.h
@@ -1,6 +1,6 @@
 /*
     net.h -- header for net.c
 /*
     net.h -- header for net.c
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -130,7 +130,6 @@ extern conn_list_t *conn_list;
 extern conn_list_t *myself;
 
 extern int send_packet(ip_t, vpn_packet_t *);
 extern conn_list_t *myself;
 
 extern int send_packet(ip_t, vpn_packet_t *);
-extern int send_broadcast(conn_list_t *, vpn_packet_t *);
 extern int setup_network_connections(void);
 extern void close_network_connections(void);
 extern void main_loop(void);
 extern int setup_network_connections(void);
 extern void close_network_connections(void);
 extern void main_loop(void);
index df6401fe89678e77c0924cede6ab087feebe9793..cc8266d712d51c394b8d8c5c36c5c7609d8b490e 100644 (file)
@@ -1,6 +1,6 @@
 /*
     netutl.c -- some supporting network utility code
 /*
     netutl.c -- some supporting network utility code
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@
 conn_list_t *lookup_conn(ip_t ip)
 {
   conn_list_t *p = conn_list;
 conn_list_t *lookup_conn(ip_t ip)
 {
   conn_list_t *p = conn_list;
-
+cp
   /* Exact match suggested by James B. MacLean */
   for(p = conn_list; p != NULL; p = p->next)
     if(ip  == p->vpn_ip)
   /* Exact match suggested by James B. MacLean */
   for(p = conn_list; p != NULL; p = p->next)
     if(ip  == p->vpn_ip)
index 91f388fe25ab73e51e252c6f850dce5fe988c854..f2187406000dcde7b8b3fcd4832975cd5a1bb550 100644 (file)
@@ -1,6 +1,6 @@
 /*
     netutl.h -- header file for netutl.c
 /*
     netutl.h -- header file for netutl.c
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index 5d84c5d7292d69a4688a48ed111cf8b015f11a34..cdf5a31c0852047af84d3b5cebe6618a19a3cedb 100644 (file)
@@ -1,6 +1,6 @@
 /*
     protocol.c -- handle the meta-protocol
 /*
     protocol.c -- handle the meta-protocol
-    Copyright (C) 1999 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -40,6 +40,8 @@
 char buffer[MAXBUFSIZE+1];
 int buflen;
 
 char buffer[MAXBUFSIZE+1];
 int buflen;
 
+/* Outgoing request routines */
+
 int send_ack(conn_list_t *cl)
 {
 cp
 int send_ack(conn_list_t *cl)
 {
 cp
@@ -180,7 +182,7 @@ cp
   return 0;
 }
 
   return 0;
 }
 
-void send_key_changed2(void)
+void send_key_changed_all(void)
 {
   conn_list_t *p;
 cp
 {
   conn_list_t *p;
 cp
index b09268173239d0e625a2ed7d62c05491d3802ff2..88a0de2902333a1bbb84a0796005e9fcda0693ff 100644 (file)
@@ -1,6 +1,6 @@
 /*
     protocol.h -- header for protocol.c
 /*
     protocol.h -- header for protocol.c
-    Copyright (C) 1999 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ extern int send_basic_info(conn_list_t *);
 extern int send_termreq(conn_list_t *);
 extern int send_timeout(conn_list_t *);
 extern int send_key_request(ip_t);
 extern int send_termreq(conn_list_t *);
 extern int send_timeout(conn_list_t *);
 extern int send_key_request(ip_t);
-extern void send_key_changed2(void);
+extern void send_key_changed_all(void);
 
 #endif /* __TINC_PROTOCOL_H__ */
 
 
 #endif /* __TINC_PROTOCOL_H__ */
 
index 74dac49b0dc7eb2b2ff6f1365c780b71b7664dfe..251e125156b3ac2230188a97854b749865d22323 100644 (file)
@@ -1,6 +1,6 @@
 /*
     tincd.c -- the main file for tincd
 /*
     tincd.c -- the main file for tincd
-    Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
+    Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -19,6 +19,9 @@
 
 /*
  * $Log: tincd.c,v $
 
 /*
  * $Log: tincd.c,v $
+ * Revision 1.8  2000/05/14 12:22:42  guus
+ * Cleanups.
+ *
  * Revision 1.7  2000/04/27 13:47:51  zarq
  * Default config file name is tinc.conf, and pidfile is tinc.pid.
  *
  * Revision 1.7  2000/04/27 13:47:51  zarq
  * Default config file name is tinc.conf, and pidfile is tinc.pid.
  *
@@ -343,7 +346,7 @@ main(int argc, char **argv, char **envp)
 
   if(show_version)
     {
 
   if(show_version)
     {
-      printf("%s version %s\nCopyright (C) 1998,99 Ivo Timmermans and others,\n"
+      printf("%s version %s\nCopyright (C) 1998,1999,2000 Ivo Timmermans and others,\n"
             "see the AUTHORS file for a complete list.\n\n"
             "tinc comes with ABSOLUTELY NO WARRANTY.  This is free software,\n"
             "and you are welcome to redistribute it under certain conditions;\n"
             "see the AUTHORS file for a complete list.\n\n"
             "tinc comes with ABSOLUTELY NO WARRANTY.  This is free software,\n"
             "and you are welcome to redistribute it under certain conditions;\n"
@@ -498,4 +501,3 @@ RETSIGTYPE parent_exit(int a)
 {
   exit(0);
 }
 {
   exit(0);
 }
-