Commit graph

56 commits

Author SHA1 Message Date
Guus Sliepen
305505f5ec Remember sockaddrs of listening sockets, use appropriate one when sending
UDP packets.
2002-03-18 22:47:20 +00:00
Guus Sliepen
14979f835d - Global time_t now, so that we don't have to call time() too often.
- MAC addresses expire after a time configurable by MACExpire (default 600
  seconds)
2002-03-01 14:09:31 +00:00
Guus Sliepen
f93b1334e0 Create/bind TCP and UDP listening sockets in pairs. 2002-03-01 13:18:54 +00:00
Guus Sliepen
c2b738e7b5 If "PriorityInheritance = yes" is specified in tinc.conf, the value of the
TOS field of the tunneled packets will be passed on to the UDP packets tinc
sends out.
2002-03-01 12:26:56 +00:00
Guus Sliepen
50403909b6 Allow multiple listening sockets. 2002-02-26 23:26:41 +00:00
Guus Sliepen
2ac7be0d51 Tweaking IPv6 support. 2002-02-26 22:47:51 +00:00
Guus Sliepen
23fda5688e - Change SA_LEN to SALEN, former one is already defined on some platforms.
- Use SALEN everywhere appropriate.
2002-02-20 22:37:38 +00:00
Guus Sliepen
dbc5b5bb5e - Use gai_strerror() where appropriate
- Clear hints before using them with getaddrinfo()
- Use sa_len on platforms that support them
2002-02-20 22:15:32 +00:00
Guus Sliepen
c2b9c06062 - Non-blocking connect()s.
- Socket handling revamped to use sockaddr_t.
- tinc can now tunnel over IPv6.
- Handle all addresses and subnets in network byte order.
  Only convert them when they need to be printed.
- IPv6 subnets bigger than /128 now work.
- Use %s and strerror(errno) instead of %m.
2002-02-18 16:25:19 +00:00
Guus Sliepen
f0aa9641e8 Merging of the entire pre5 branch. 2002-02-10 21:57:54 +00:00
Ivo Timmermans
fb6dc0b089 Removed definitions of ipv4_t, ipv6_t, port_t 2001-11-16 12:08:38 +00:00
Guus Sliepen
ac066bb057 Make sure everything links. 2001-10-27 13:13:35 +00:00
Guus Sliepen
82e3837109 Big bad commit:
- Transition to new node/vertex/connection structures
- Use new configuration handling everywhere
- Linux tun/tap device handling cleanup
- Start of IPv6 support in route.c

It compiles, but it won't link.
2001-10-27 12:13:17 +00:00
Guus Sliepen
acb853205d Updated terminate_connection() so you can choose if DEL_HOSTs should be
sent or not.
2001-07-21 15:34:18 +00:00
Guus Sliepen
ba918dce28 Only reset seconds_till_retry when we activate the outgoing connection. 2001-06-08 18:02:10 +00:00
Guus Sliepen
4f9dad0972 - tinc can now act as a switch or a hub too (as opposed to a router only)
- cleaner initialisation of "UNKNOWN" and "MYSELF" names
2001-06-05 16:09:55 +00:00
Guus Sliepen
fcf869cd42 TCPonly now works (in a relatively clean way too). 2001-05-25 11:54:28 +00:00
Guus Sliepen
e4f3d93ec6 - s/ip_t/ipv4_t/g
- Add "salt" to the beginning of UDP packets. Replaces length field which
  is not useful anyway.
2001-05-07 19:08:46 +00:00
Guus Sliepen
34f9e6cf2d - route.c is now used to determine destination
- flags are removed, since they were not used at all. Use options instead.
- indirectdata works now, tcponly almost...
- made functions that don't return useful information void
2001-03-04 13:59:32 +00:00
Guus Sliepen
4fa12eb85d Removed lots of compiler warnings. 2001-02-27 16:37:31 +00:00
Guus Sliepen
447a43d639 - Added indirectdata and tcponly functionality. 2001-01-07 20:19:35 +00:00
Guus Sliepen
d3f889c807 - It's 2001, all copyright notices are updated. 2001-01-07 17:09:07 +00:00
Guus Sliepen
07a08f5539 - Reinstated a queue for outgoing packets. 2001-01-07 15:25:49 +00:00
Guus Sliepen
e1707f7739 - Don't even think about using sscanf with %as anymore
- Allow keys to be inside the config files or in a seperate file
- Small fixes
2000-12-22 21:34:24 +00:00
Ivo Timmermans
a0f7af3ed7 New function read_rsa_public_key();
In net.c/setup_myself deleted old code to read the public key (which
is now implicitly read in together with the private key).
2000-11-30 23:18:21 +00:00
Guus Sliepen
408ca91766 - Integrate rbl trees into tinc. 2000-11-20 19:12:17 +00:00
Guus Sliepen
698191fd2f - Prepended config_ to all configuration option names, because it confused
everything (including myself).
- Use connection oriented UDP sockets for both incoming and outgoing
  packets.
2000-11-04 22:57:33 +00:00
Guus Sliepen
8fa9bc017d - Removed old encr stuff 2000-10-29 09:19:27 +00:00
Guus Sliepen
e8391bd499 - Moved connlist stuff to the proper header file. 2000-10-29 01:27:23 +00:00
Guus Sliepen
8738c007b1 - Fixed offsets when reading/writing from/to tap device 2000-10-28 21:25:21 +00:00
Guus Sliepen
85adeef212 - The daemon actually runs now (somewhat)
- Added support for tun/tap driver (autodetect!)
- More sophisticated checkpoint functionality
- Updated dutch translation
2000-10-15 00:59:37 +00:00
Guus Sliepen
e9635ae38e - Second fixing-things pass: it even links now.
- Lots of FIXME comments added to the source code.
2000-10-14 17:04:16 +00:00
Guus Sliepen
183a8edd22 - Fixing-things pass: every source file compiles into an object file now,
but linking tincd does not work yet (must link with openssl libs and
  define some missing functions).
2000-10-11 22:01:02 +00:00
Guus Sliepen
950fb8e916 Big and bad commit of my current tree...
- Added seperate file for connection list handling
- Updating everything to use connlist, meta and subnet files
- Removed dependency on libgmp
- Lots of other stuff...
2000-10-11 10:35:17 +00:00
Guus Sliepen
2228b16159 - Added subnet handling code
- Other small changes to header files
2000-10-01 03:21:49 +00:00
Ivo Timmermans
7f3ab38c22 Second round of fixes 2000-09-15 12:58:40 +00:00
Ivo Timmermans
ed397b6ac6 First round of needed fixes after the overhaul 2000-09-14 21:51:21 +00:00
Ivo Timmermans
d335c6d0d7 Added some structures and types that are needed for the overhaul. 2000-09-14 14:32:34 +00:00
Guus Sliepen
3cfc9424f2 - Moved TCP packet reception to meta handler: less kludgy and less buggy! 2000-08-08 17:07:48 +00:00
Guus Sliepen
b6997b0050 - Lots o' buglets fixed (-Wall helps)
- Made TCPonly work :)
2000-08-07 16:27:29 +00:00
Guus Sliepen
fdc6a2f106 - Added experimental hackish tunneling-over-TCP support.
Just use TCPonly = true in the configuration file.
2000-08-07 14:52:16 +00:00
Guus Sliepen
1b28f88808 - Removed a single unused bit from status_bits_t. 2000-07-01 07:49:21 +00:00
Guus Sliepen
e8e7379311 - Removed all IP_ADDR_S macros, because gettext doesn't like them. Each
connection now has two hostnames: real_hostname (replacing the old),
  and vpn_hostname. In those places where hostnames really aren't usefull
  IP_ADDR_S has been replaced by %d.%d.%d.%d.
2000-06-29 13:04:15 +00:00
Guus Sliepen
54079bdf03 Hostnames are back! 2000-06-25 16:01:12 +00:00
Guus Sliepen
7648bc6065 Added CVS Id tags to header files. 2000-06-25 15:22:16 +00:00
Guus Sliepen
7f7e158aae Large cleanup:
- Removed hostname lookup (it blocks, and you can always do it yourself)
- Reorganized debug levels (after hints from Axel M�ller):
  0	Startup message and errors
  1	Connection logging
  2	Meta protocol information
  3	Verbose meta protocol (includes copy of transmitted requests)
  4	Packet information (logs transmission/errors of UDP packets)
  5	Verbose packet information (every single byte, not implemented yet
	to protect ourselves from filling up /var/log directories)
- Made log messages more consistent
2000-06-25 15:16:12 +00:00
Guus Sliepen
d8e2f7104c First step for implementation of the "indirectdata" directive. This should
allow _leaf_ tincds to be behind firewalls.
The protocol has changed and is INCOMPATIBLE with previous versions. The
PROT_CURRENT value has been incremented.
2000-06-23 19:27:03 +00:00
Guus Sliepen
e20e143f1e Changed ping behaviour (backwards compatible). If we don't have any data
to send, we don't need to check if the connection is still alive.
Furthermore, if we receive any kind of data from the other end, we know
it's alive, so we don't need to check it either. So, PING requests are
only sent if we send packets but there is no response.
2000-05-14 13:02:20 +00:00
Guus Sliepen
ee96ccabbb Cleanups. 2000-05-14 12:22:42 +00:00
Guus Sliepen
89610e3fba Replaced sprintf() by safer snprintf(), removed possible buffer overflow
by one byte.
2000-05-02 10:16:50 +00:00