Import Upstream version 1.0.8

This commit is contained in:
Guus Sliepen 2019-08-26 13:44:38 +02:00
parent 77e8278660
commit 6276954b04
21 changed files with 390 additions and 245 deletions

View file

@ -1,3 +1,53 @@
------------------------------------------------------------------------
r1510 | guus | 2007-05-16 16:46:25 +0200 (wo, 16 mei 2007) | 2 lines
Don't free struct addrinfo too early. Spotted by Christian Cier-Zniewski.
------------------------------------------------------------------------
r1509 | guus | 2007-05-16 16:42:41 +0200 (wo, 16 mei 2007) | 2 lines
Update dutch translation.
------------------------------------------------------------------------
r1508 | guus | 2007-05-16 16:42:08 +0200 (wo, 16 mei 2007) | 2 lines
Make sure connection->name is never NULL.
------------------------------------------------------------------------
r1507 | guus | 2007-05-14 11:21:09 +0200 (ma, 14 mei 2007) | 2 lines
Apply patch from "dnk" making sockets non-blocking under Windows.
------------------------------------------------------------------------
r1500 | guus | 2007-02-14 10:32:16 +0100 (wo, 14 feb 2007) | 2 lines
Close the proper filedescriptor (if it exists).
------------------------------------------------------------------------
r1499 | guus | 2007-02-14 10:21:34 +0100 (wo, 14 feb 2007) | 2 lines
Apply patch from Scott Lamb fixing some memory and resource leaks.
------------------------------------------------------------------------
r1498 | guus | 2007-02-14 10:20:20 +0100 (wo, 14 feb 2007) | 2 lines
Apply patch from Scott Lamb preventing an infinite loop when sending SIGALRM.
------------------------------------------------------------------------
r1497 | guus | 2007-01-05 16:03:07 +0100 (vr, 05 jan 2007) | 2 lines
Releasing 1.0.7.
------------------------------------------------------------------------
r1496 | guus | 2007-01-05 14:18:36 +0100 (vr, 05 jan 2007) | 2 lines
Update copyright notices.
------------------------------------------------------------------------
r1495 | guus | 2007-01-05 14:17:33 +0100 (vr, 05 jan 2007) | 2 lines
No things to do for the 1.0 branch except bugfixing.
------------------------------------------------------------------------ ------------------------------------------------------------------------
r1494 | guus | 2007-01-05 06:44:01 +0100 (vr, 05 jan 2007) | 2 lines r1494 | guus | 2007-01-05 06:44:01 +0100 (vr, 05 jan 2007) | 2 lines

6
NEWS
View file

@ -1,3 +1,9 @@
Version 1.0.8 May 16 2007
* Fixed some memory and resource leaks.
* Made network sockets non-blocking under Windows.
Version 1.0.7 Jan 5 2007 Version 1.0.7 Jan 5 2007
* Fixed a bug that caused slow network speeds on Windows. * Fixed a bug that caused slow network speeds on Windows.

6
README
View file

@ -1,7 +1,7 @@
This is the README file for tinc version 1.0.7. Installation This is the README file for tinc version 1.0.8. Installation
instructions may be found in the INSTALL file. instructions may be found in the INSTALL file.
tinc is Copyright (C) 1998-2006 by: tinc is Copyright (C) 1998-2007 by:
Ivo Timmermans, Ivo Timmermans,
Guus Sliepen <guus@tinc-vpn.org>, Guus Sliepen <guus@tinc-vpn.org>,
@ -55,7 +55,7 @@ should be changed into "Device", and "Device" should be changed into
Compatibility Compatibility
------------- -------------
Version 1.0.7 is compatible with 1.0pre8, 1.0 and later, but not with older Version 1.0.8 is compatible with 1.0pre8, 1.0 and later, but not with older
versions of tinc. versions of tinc.

32
config.guess vendored
View file

@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc. # Inc.
timestamp='2006-07-02' timestamp='2007-03-06'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;; arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;; sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;; sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac esac
# The Operating System including object format, if it has switched # The Operating System including object format, if it has switched
@ -780,7 +781,7 @@ EOF
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
exit ;; exit ;;
i*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:windows32*:*) i*:windows32*:*)
@ -790,12 +791,15 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
x86:Interix*:[3456]*) *:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE} case ${UNAME_MACHINE} in
exit ;; x86)
EM64T:Interix*:[3456]*) echo i586-pc-interix${UNAME_RELEASE}
echo x86_64-unknown-interix${UNAME_RELEASE} exit ;;
exit ;; EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks echo i${UNAME_MACHINE}-pc-mks
exit ;; exit ;;
@ -950,6 +954,9 @@ EOF
x86_64:Linux:*:*) x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu echo x86_64-unknown-linux-gnu
exit ;; exit ;;
xtensa:Linux:*:*)
echo xtensa-unknown-linux-gnu
exit ;;
i*86:Linux:*:*) i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so # The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent # first see if it will tell us. cd to the root directory to prevent
@ -1208,6 +1215,15 @@ EOF
SX-6:SUPER-UX:*:*) SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE} echo sx6-nec-superux${UNAME_RELEASE}
exit ;; exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*) Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE} echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;; exit ;;

16
config.sub vendored
View file

@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc. # Inc.
timestamp='2006-09-20' timestamp='2007-01-18'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@ -245,12 +245,12 @@ case $basic_machine in
| bfin \ | bfin \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| fr30 | frv \ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore \ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \ | mips16 \
| mips64 | mips64el \ | mips64 | mips64el \
@ -324,7 +324,7 @@ case $basic_machine in
| clipper-* | craynv-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
@ -925,6 +925,9 @@ case $basic_machine in
basic_machine=sh-hitachi basic_machine=sh-hitachi
os=-hms os=-hms
;; ;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64) sh64)
basic_machine=sh64-unknown basic_machine=sh64-unknown
;; ;;
@ -1219,7 +1222,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@ -1414,6 +1417,9 @@ case $basic_machine in
m68*-cisco) m68*-cisco)
os=-aout os=-aout
;; ;;
mep-*)
os=-elf
;;
mips*-cisco) mips*-cisco)
os=-elf os=-elf
;; ;;

2
configure vendored
View file

@ -2107,7 +2107,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=tinc PACKAGE=tinc
VERSION=1.0.7 VERSION=1.0.8
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF

View file

@ -5,7 +5,7 @@ dnl $Id: configure.in 1488 2006-12-16 16:53:58Z guus $
AC_PREREQ(2.61) AC_PREREQ(2.61)
AC_INIT AC_INIT
AC_CONFIG_SRCDIR([src/tincd.c]) AC_CONFIG_SRCDIR([src/tincd.c])
AM_INIT_AUTOMAKE(tinc, 1.0.7) AM_INIT_AUTOMAKE(tinc, 1.0.8)
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE

Binary file not shown.

View file

@ -5,7 +5,7 @@ START-INFO-DIR-ENTRY
* tinc: (tinc). The tinc Manual. * tinc: (tinc). The tinc Manual.
END-INFO-DIR-ENTRY END-INFO-DIR-ENTRY
This is the info manual for tinc version 1.0.7, a Virtual Private This is the info manual for tinc version 1.0.8, a Virtual Private
Network daemon. Network daemon.
Copyright (C) 1998-2006 Ivo Timmermans, Guus Sliepen Copyright (C) 1998-2006 Ivo Timmermans, Guus Sliepen
@ -662,16 +662,15 @@ means that you call tincd with the -n argument, which will assign a
netname to this daemon. netname to this daemon.
The effect of this is that the daemon will set its configuration The effect of this is that the daemon will set its configuration
root to `/usr/local/etc/tinc/NETNAME/', where NETNAME is your argument root to `/etc/tinc/NETNAME/', where NETNAME is your argument to the -n
to the -n option. You'll notice that it appears in syslog as option. You'll notice that it appears in syslog as `tinc.NETNAME'.
`tinc.NETNAME'.
However, it is not strictly necessary that you call tinc with the -n However, it is not strictly necessary that you call tinc with the -n
option. In this case, the network name would just be empty, and it will option. In this case, the network name would just be empty, and it will
be used as such. tinc now looks for files in `/usr/local/etc/tinc/', be used as such. tinc now looks for files in `/etc/tinc/', instead of
instead of `/usr/local/etc/tinc/NETNAME/'; the configuration file `/etc/tinc/NETNAME/'; the configuration file should be
should be `/usr/local/etc/tinc/tinc.conf', and the host configuration `/etc/tinc/tinc.conf', and the host configuration files are now
files are now expected to be in `/usr/local/etc/tinc/hosts/'. expected to be in `/etc/tinc/hosts/'.
But it is highly recommended that you use this feature of tinc, But it is highly recommended that you use this feature of tinc,
because it will be so much clearer whom your daemon talks to. Hence, because it will be so much clearer whom your daemon talks to. Hence,
@ -708,8 +707,8 @@ File: tinc.info, Node: Configuration files, Next: Generating keypairs, Prev:
======================= =======================
The actual configuration of the daemon is done in the file The actual configuration of the daemon is done in the file
`/usr/local/etc/tinc/NETNAME/tinc.conf' and at least one other file in `/etc/tinc/NETNAME/tinc.conf' and at least one other file in the
the directory `/usr/local/etc/tinc/NETNAME/hosts/'. directory `/etc/tinc/NETNAME/hosts/'.
These file consists of comments (lines started with a #) or These file consists of comments (lines started with a #) or
assignments in the form of assignments in the form of
@ -867,7 +866,7 @@ PrivateKey = <KEY> [obsolete]
This prevents accidental eavesdropping if you are editting the This prevents accidental eavesdropping if you are editting the
configuration file. configuration file.
PrivateKeyFile = <PATH> (`/usr/local/etc/tinc/NETNAME/rsa_key.priv') PrivateKeyFile = <PATH> (`/etc/tinc/NETNAME/rsa_key.priv')
This is the full path name of the RSA private key file that was This is the full path name of the RSA private key file that was
generated by `tincd --generate-keys'. It must be a full path, not generated by `tincd --generate-keys'. It must be a full path, not
a relative directory. a relative directory.
@ -879,7 +878,7 @@ TunnelServer = <yes|no> (no) [experimental]
When this option is enabled tinc will no longer forward When this option is enabled tinc will no longer forward
information between other tinc daemons, and will only allow nodes information between other tinc daemons, and will only allow nodes
and subnets on the VPN which are present in the and subnets on the VPN which are present in the
`/usr/local/etc/tinc/NETNAME/hosts/' directory. `/etc/tinc/NETNAME/hosts/' directory.
 
@ -982,7 +981,7 @@ Apart from reading the server and host configuration files, tinc can
also run scripts at certain moments. Under Windows (not Cygwin), the also run scripts at certain moments. Under Windows (not Cygwin), the
scripts should have the extension .bat. scripts should have the extension .bat.
`/usr/local/etc/tinc/NETNAME/tinc-up' `/etc/tinc/NETNAME/tinc-up'
This is the most important script. If it is present it will be This is the most important script. If it is present it will be
executed right after the tinc daemon has been started and has executed right after the tinc daemon has been started and has
connected to the virtual network device. It should be used to set connected to the virtual network device. It should be used to set
@ -990,29 +989,29 @@ scripts should have the extension .bat.
start other things. Under Windows you can use the Network start other things. Under Windows you can use the Network
Connections control panel instead of creating this script. Connections control panel instead of creating this script.
`/usr/local/etc/tinc/NETNAME/tinc-down' `/etc/tinc/NETNAME/tinc-down'
This script is started right before the tinc daemon quits. This script is started right before the tinc daemon quits.
`/usr/local/etc/tinc/NETNAME/hosts/HOST-up' `/etc/tinc/NETNAME/hosts/HOST-up'
This script is started when the tinc daemon with name HOST becomes This script is started when the tinc daemon with name HOST becomes
reachable. reachable.
`/usr/local/etc/tinc/NETNAME/hosts/HOST-down' `/etc/tinc/NETNAME/hosts/HOST-down'
This script is started when the tinc daemon with name HOST becomes This script is started when the tinc daemon with name HOST becomes
unreachable. unreachable.
`/usr/local/etc/tinc/NETNAME/host-up' `/etc/tinc/NETNAME/host-up'
This script is started when any host becomes reachable. This script is started when any host becomes reachable.
`/usr/local/etc/tinc/NETNAME/host-down' `/etc/tinc/NETNAME/host-down'
This script is started when any host becomes unreachable. This script is started when any host becomes unreachable.
`/usr/local/etc/tinc/NETNAME/subnet-up' `/etc/tinc/NETNAME/subnet-up'
This script is started when a Subnet becomes reachable. The This script is started when a Subnet becomes reachable. The
Subnet and the node it belongs to are passed in environment Subnet and the node it belongs to are passed in environment
variables. variables.
`/usr/local/etc/tinc/NETNAME/subnet-down' `/etc/tinc/NETNAME/subnet-down'
This script is started when a Subnet becomes unreachable. This script is started when a Subnet becomes unreachable.
The scripts are started without command line arguments, but can make The scripts are started without command line arguments, but can make
@ -1060,8 +1059,8 @@ Step 1. Creating the main configuration file
............................................. .............................................
The main configuration file will be called The main configuration file will be called
`/usr/local/etc/tinc/NETNAME/tinc.conf'. Adapt the following example `/etc/tinc/NETNAME/tinc.conf'. Adapt the following example to create a
to create a basic configuration file: basic configuration file:
Name = YOURNAME Name = YOURNAME
Device = `/dev/tap0' Device = `/dev/tap0'
@ -1074,8 +1073,8 @@ Step 2. Creating your host configuration file
If you added a line containing `Name = yourname' in the main If you added a line containing `Name = yourname' in the main
configuarion file, you will need to create a host configuration file configuarion file, you will need to create a host configuration file
`/usr/local/etc/tinc/NETNAME/hosts/yourname'. Adapt the following `/etc/tinc/NETNAME/hosts/yourname'. Adapt the following example to
example to create a host configuration file: create a host configuration file:
Address = your.real.hostname.org Address = your.real.hostname.org
Subnet = 192.168.1.0/24 Subnet = 192.168.1.0/24
@ -1122,10 +1121,10 @@ Network Connections control panel.
You can configure the network interface by putting ordinary You can configure the network interface by putting ordinary
ifconfig, route, and other commands to a script named ifconfig, route, and other commands to a script named
`/usr/local/etc/tinc/NETNAME/tinc-up'. When tinc starts, this script `/etc/tinc/NETNAME/tinc-up'. When tinc starts, this script will be
will be executed. When tinc exits, it will execute the script named executed. When tinc exits, it will execute the script named
`/usr/local/etc/tinc/NETNAME/tinc-down', but normally you don't need to `/etc/tinc/NETNAME/tinc-down', but normally you don't need to create
create that script. that script.
An example `tinc-up' script: An example `tinc-up' script:
@ -1181,19 +1180,19 @@ For Branch A
_BranchA_ would be configured like this: _BranchA_ would be configured like this:
In `/usr/local/etc/tinc/company/tinc-up': In `/etc/tinc/company/tinc-up':
# Real interface of internal network: # Real interface of internal network:
# ifconfig eth0 10.1.54.1 netmask 255.255.0.0 # ifconfig eth0 10.1.54.1 netmask 255.255.0.0
ifconfig $INTERFACE 10.1.54.1 netmask 255.0.0.0 ifconfig $INTERFACE 10.1.54.1 netmask 255.0.0.0
and in `/usr/local/etc/tinc/company/tinc.conf': and in `/etc/tinc/company/tinc.conf':
Name = BranchA Name = BranchA
Device = /dev/tap0 Device = /dev/tap0
On all hosts, `/usr/local/etc/tinc/company/hosts/BranchA' contains: On all hosts, `/etc/tinc/company/hosts/BranchA' contains:
Subnet = 10.1.0.0/16 Subnet = 10.1.0.0/16
Address = 1.2.3.4 Address = 1.2.3.4
@ -1211,14 +1210,14 @@ since that will make things a lot easier to remember and set up.
For Branch B For Branch B
............ ............
In `/usr/local/etc/tinc/company/tinc-up': In `/etc/tinc/company/tinc-up':
# Real interface of internal network: # Real interface of internal network:
# ifconfig eth0 10.2.43.8 netmask 255.255.0.0 # ifconfig eth0 10.2.43.8 netmask 255.255.0.0
ifconfig $INTERFACE 10.2.1.12 netmask 255.0.0.0 ifconfig $INTERFACE 10.2.1.12 netmask 255.0.0.0
and in `/usr/local/etc/tinc/company/tinc.conf': and in `/etc/tinc/company/tinc.conf':
Name = BranchB Name = BranchB
ConnectTo = BranchA ConnectTo = BranchA
@ -1227,7 +1226,7 @@ In `/usr/local/etc/tinc/company/tinc-up':
same as on the tap0 device. Also, ConnectTo is given so that no-one can same as on the tap0 device. Also, ConnectTo is given so that no-one can
connect to this node. connect to this node.
On all hosts, in `/usr/local/etc/tinc/company/hosts/BranchB': On all hosts, in `/etc/tinc/company/hosts/BranchB':
Subnet = 10.2.0.0/16 Subnet = 10.2.0.0/16
Address = 2.3.4.5 Address = 2.3.4.5
@ -1239,14 +1238,14 @@ connect to this node.
For Branch C For Branch C
............ ............
In `/usr/local/etc/tinc/company/tinc-up': In `/etc/tinc/company/tinc-up':
# Real interface of internal network: # Real interface of internal network:
# ifconfig eth0 10.3.69.254 netmask 255.255.0.0 # ifconfig eth0 10.3.69.254 netmask 255.255.0.0
ifconfig $INTERFACE 10.3.69.254 netmask 255.0.0.0 ifconfig $INTERFACE 10.3.69.254 netmask 255.0.0.0
and in `/usr/local/etc/tinc/company/tinc.conf': and in `/etc/tinc/company/tinc.conf':
Name = BranchC Name = BranchC
ConnectTo = BranchA ConnectTo = BranchA
@ -1256,7 +1255,7 @@ In `/usr/local/etc/tinc/company/tinc-up':
reserve another port for tinc. It knows the portnumber it has to listen reserve another port for tinc. It knows the portnumber it has to listen
on from it's own host configuration file. on from it's own host configuration file.
On all hosts, in `/usr/local/etc/tinc/company/hosts/BranchC': On all hosts, in `/etc/tinc/company/hosts/BranchC':
Address = 3.4.5.6 Address = 3.4.5.6
Subnet = 10.3.0.0/16 Subnet = 10.3.0.0/16
@ -1269,14 +1268,14 @@ on from it's own host configuration file.
For Branch D For Branch D
............ ............
In `/usr/local/etc/tinc/company/tinc-up': In `/etc/tinc/company/tinc-up':
# Real interface of internal network: # Real interface of internal network:
# ifconfig eth0 10.4.3.32 netmask 255.255.0.0 # ifconfig eth0 10.4.3.32 netmask 255.255.0.0
ifconfig $INTERFACE 10.4.3.32 netmask 255.0.0.0 ifconfig $INTERFACE 10.4.3.32 netmask 255.0.0.0
and in `/usr/local/etc/tinc/company/tinc.conf': and in `/etc/tinc/company/tinc.conf':
Name = BranchD Name = BranchD
ConnectTo = BranchC ConnectTo = BranchC
@ -1288,7 +1287,7 @@ configuration file. Also note that since D uses the tun/tap driver,
the network interface will not be called `tun' or `tap0' or something the network interface will not be called `tun' or `tap0' or something
like that, but will have the same name as netname. like that, but will have the same name as netname.
On all hosts, in `/usr/local/etc/tinc/company/hosts/BranchD': On all hosts, in `/etc/tinc/company/hosts/BranchD':
Subnet = 10.4.0.0/16 Subnet = 10.4.0.0/16
Address = 4.5.6.7 Address = 4.5.6.7
@ -1305,12 +1304,11 @@ following command:
tincd -n company -K tincd -n company -K
The private key is stored in The private key is stored in `/etc/tinc/company/rsa_key.priv', the
`/usr/local/etc/tinc/company/rsa_key.priv', the public key is put into public key is put into the host configuration file in the
the host configuration file in the `/usr/local/etc/tinc/company/hosts/' `/etc/tinc/company/hosts/' directory. During key generation, tinc
directory. During key generation, tinc automatically guesses the right automatically guesses the right filenames based on the -n option and
filenames based on the -n option and the Name directive in the the Name directive in the `tinc.conf' file (if it is available).
`tinc.conf' file (if it is available).
Starting Starting
........ ........
@ -1357,7 +1355,7 @@ command line options.
`-c, --config=PATH' `-c, --config=PATH'
Read configuration options from the directory PATH. The default is Read configuration options from the directory PATH. The default is
`/usr/local/etc/tinc/NETNAME/'. `/etc/tinc/NETNAME/'.
`-D, --no-detach' `-D, --no-detach'
Don't fork and detach. This will also disable the automatic Don't fork and detach. This will also disable the automatic
@ -1392,10 +1390,10 @@ command line options.
`--logfile[=FILE]' `--logfile[=FILE]'
Write log entries to a file instead of to the system logging Write log entries to a file instead of to the system logging
facility. If FILE is omitted, the default is facility. If FILE is omitted, the default is
`/usr/local/var/log/tinc.NETNAME.log'. `/var/log/tinc.NETNAME.log'.
`--pidfile=FILE' `--pidfile=FILE'
Write PID to FILE instead of `/usr/local/var/run/tinc.NETNAME.pid'. Write PID to FILE instead of `/var/run/tinc.NETNAME.pid'.
`--bypass-security' `--bypass-security'
Disables encryption and authentication. Only useful for debugging. Disables encryption and authentication. Only useful for debugging.
@ -2397,37 +2395,37 @@ Node: Other files21534
Node: Configuration22147 Node: Configuration22147
Node: Configuration introduction22458 Node: Configuration introduction22458
Node: Multiple networks23731 Node: Multiple networks23731
Node: How connections work25207 Node: How connections work25157
Node: Configuration files26429 Node: Configuration files26379
Node: Main configuration variables27456 Node: Main configuration variables27386
Node: Host configuration variables33953 Node: Host configuration variables33863
Node: Scripts38249 Node: Scripts38159
Node: How to configure41008 Node: How to configure40838
Node: Generating keypairs42291 Node: Generating keypairs42101
Node: Network interfaces42790 Node: Network interfaces42600
Node: Example configuration44658 Node: Example configuration44448
Node: Running tinc50110 Node: Running tinc49760
Node: Runtime options50700 Node: Runtime options50350
Node: Signals52737 Node: Signals52357
Node: Debug levels53806 Node: Debug levels53426
Node: Solving problems54742 Node: Solving problems54362
Node: Error messages56172 Node: Error messages55792
Node: Sending bug reports60494 Node: Sending bug reports60114
Node: Technical information61446 Node: Technical information61066
Node: The connection61677 Node: The connection61297
Node: The UDP tunnel61989 Node: The UDP tunnel61609
Node: The meta-connection65050 Node: The meta-connection64670
Node: The meta-protocol66519 Node: The meta-protocol66139
Node: Security71528 Node: Security71148
Node: Authentication protocol72658 Node: Authentication protocol72278
Node: Encryption of network packets77662 Node: Encryption of network packets77282
Node: Security issues79035 Node: Security issues78655
Node: Platform specific information80652 Node: Platform specific information80272
Node: Interface configuration80880 Node: Interface configuration80500
Node: Routes82779 Node: Routes82399
Node: About us84695 Node: About us84315
Node: Contact information84870 Node: Contact information84490
Node: Authors85274 Node: Authors84894
Node: Concept Index85700 Node: Concept Index85320
 
End Tag Table End Tag Table

View file

@ -84,8 +84,12 @@ pid_t write_pid (char *pidfile)
int fd; int fd;
pid_t pid; pid_t pid;
if ( ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1) if ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1) {
|| ((f = fdopen(fd, "r+")) == NULL) ) { return 0;
}
if ((f = fdopen(fd, "r+")) == NULL) {
close(fd);
return 0; return 0;
} }
@ -98,18 +102,18 @@ pid_t write_pid (char *pidfile)
pid = getpid(); pid = getpid();
if (!fprintf(f,"%ld\n", (long)pid)) { if (!fprintf(f,"%ld\n", (long)pid)) {
close(fd); fclose(f);
return 0; return 0;
} }
fflush(f); fflush(f);
#ifdef HAVE_FLOCK #ifdef HAVE_FLOCK
if (flock(fd, LOCK_UN) == -1) { if (flock(fd, LOCK_UN) == -1) {
close(fd); fclose(f);
return 0; return 0;
} }
#endif #endif
close(fd); fclose(f);
return pid; return pid;
} }

BIN
po/nl.gmo

Binary file not shown.

128
po/nl.po
View file

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: tinc 1.0-svn\n" "Project-Id-Version: tinc 1.0-svn\n"
"Report-Msgid-Bugs-To: tinc-devel@tinc-vpn.org\n" "Report-Msgid-Bugs-To: tinc-devel@tinc-vpn.org\n"
"POT-Creation-Date: 2007-01-05 14:14+0100\n" "POT-Creation-Date: 2007-05-16 16:50+0200\n"
"PO-Revision-Date: 2007-01-05 14:14+0100\n" "PO-Revision-Date: 2007-05-16 16:40+0200\n"
"Last-Translator: Guus Sliepen <guus@tinc-vpn.org>\n" "Last-Translator: Guus Sliepen <guus@tinc-vpn.org>\n"
"Language-Team: Dutch\n" "Language-Team: Dutch\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -90,16 +90,16 @@ msgstr "iedereen"
msgid "BROADCAST" msgid "BROADCAST"
msgstr "BROADCAST" msgstr "BROADCAST"
#: src/connection.c:120 #: src/connection.c:123
msgid "Connections:" msgid "Connections:"
msgstr "Verbindingen:" msgstr "Verbindingen:"
#: src/connection.c:124 #: src/connection.c:127
#, c-format #, c-format
msgid " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d" msgid " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d"
msgstr " %s op %s opties %lx socket %d status %04x outbuf %d/%d/%d" msgstr " %s op %s opties %lx socket %d status %04x outbuf %d/%d/%d"
#: src/connection.c:129 #: src/connection.c:132
msgid "End of connections." msgid "End of connections."
msgstr "Einde van verbindingen." msgstr "Einde van verbindingen."
@ -206,7 +206,7 @@ msgstr "Hergenereren symmetrische sleutel"
msgid "Flushing event queue" msgid "Flushing event queue"
msgstr "Legen taakrij" msgstr "Legen taakrij"
#: src/net.c:455 #: src/net.c:450
msgid "Unable to reread configuration file, exitting." msgid "Unable to reread configuration file, exitting."
msgstr "Kan configuratiebestand niet herlezen, beëindigen." msgstr "Kan configuratiebestand niet herlezen, beëindigen."
@ -287,13 +287,13 @@ msgstr "Fout tijdens versleutelen pakket naar %s (%s): %s"
msgid "Setting outgoing packet priority to %d" msgid "Setting outgoing packet priority to %d"
msgstr "Instellen prioriteit uitgaand pakket op %d" msgstr "Instellen prioriteit uitgaand pakket op %d"
#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:129 #: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:135
#: src/net_socket.c:158 src/tincd.c:435 src/tincd.c:472 src/process.c:198 #: src/net_socket.c:164 src/tincd.c:435 src/tincd.c:472 src/process.c:198
#: src/process.c:231 src/process.c:428 src/bsd/device.c:93 #: src/process.c:231 src/process.c:430 src/bsd/device.c:93
#: src/bsd/device.c:112 src/cygwin/device.c:140 src/cygwin/device.c:171 #: src/bsd/device.c:112 src/cygwin/device.c:140 src/cygwin/device.c:171
#: src/mingw/device.c:73 src/mingw/device.c:82 src/mingw/device.c:87 #: src/mingw/device.c:73 src/mingw/device.c:80 src/mingw/device.c:86
#: src/mingw/device.c:256 src/mingw/device.c:263 src/mingw/device.c:268 #: src/mingw/device.c:258 src/mingw/device.c:265 src/mingw/device.c:270
#: src/mingw/device.c:275 src/mingw/device.c:284 src/mingw/device.c:291 #: src/mingw/device.c:277 src/mingw/device.c:286 src/mingw/device.c:293
#: src/uml_socket/device.c:89 src/uml_socket/device.c:103 #: src/uml_socket/device.c:89 src/uml_socket/device.c:103
#: src/uml_socket/device.c:130 src/uml_socket/device.c:194 #: src/uml_socket/device.c:130 src/uml_socket/device.c:194
#, c-format #, c-format
@ -455,86 +455,96 @@ msgstr "Kon geen enkele luistersocket aanmaken!"
msgid "fcntl for %s: %s" msgid "fcntl for %s: %s"
msgstr "fcntl voor %s: %s" msgstr "fcntl voor %s: %s"
#: src/net_socket.c:90 #: src/net_socket.c:69
#, c-format
msgid "ioctlsocket for %s: WSA error %d"
msgstr "ioctlsocket voor %s: WSA fout %d"
#: src/net_socket.c:96
#, c-format #, c-format
msgid "Creating metasocket failed: %s" msgid "Creating metasocket failed: %s"
msgstr "Aanmaak van metasocket mislukt: %s" msgstr "Aanmaak van metasocket mislukt: %s"
#: src/net_socket.c:109 src/net_socket.c:201 #: src/net_socket.c:115 src/net_socket.c:217
#, c-format #, c-format
msgid "Can't bind to interface %s: %s" msgid "Can't bind to interface %s: %s"
msgstr "Kan niet aan interface %s binden: %s" msgstr "Kan niet aan interface %s binden: %s"
#: src/net_socket.c:114 #: src/net_socket.c:120
msgid "BindToInterface not supported on this platform" msgid "BindToInterface not supported on this platform"
msgstr "BindToInterface wordt niet ondersteund op dit platform" msgstr "BindToInterface wordt niet ondersteund op dit platform"
#: src/net_socket.c:121 #: src/net_socket.c:127
#, c-format #, c-format
msgid "Can't bind to %s/tcp: %s" msgid "Can't bind to %s/tcp: %s"
msgstr "Kan niet aan %s/tcp binden: %s" msgstr "Kan niet aan %s/tcp binden: %s"
#: src/net_socket.c:148 #: src/net_socket.c:154
#, c-format #, c-format
msgid "Creating UDP socket failed: %s" msgid "Creating UDP socket failed: %s"
msgstr "Aanmaak UDP socket mislukte: %s" msgstr "Aanmaak UDP socket mislukte: %s"
#: src/net_socket.c:212 #: src/net_socket.c:174
#, c-format
msgid "Call to `%s' failed: WSA error %d"
msgstr "Systeemaanroep `%s' mislukte: WSA fout %d"
#: src/net_socket.c:228
#, c-format #, c-format
msgid "Can't bind to %s/udp: %s" msgid "Can't bind to %s/udp: %s"
msgstr "Kan niet aan %s/udp binden: %s" msgstr "Kan niet aan %s/udp binden: %s"
#: src/net_socket.c:239 #: src/net_socket.c:255
#, c-format #, c-format
msgid "Trying to re-establish outgoing connection in %d seconds" msgid "Trying to re-establish outgoing connection in %d seconds"
msgstr "Poging tot herstellen van uitgaande verbinding over %d seconden" msgstr "Poging tot herstellen van uitgaande verbinding over %d seconden"
#: src/net_socket.c:247 #: src/net_socket.c:263
#, c-format #, c-format
msgid "Connected to %s (%s)" msgid "Connected to %s (%s)"
msgstr "Verbonden met %s (%s)" msgstr "Verbonden met %s (%s)"
#: src/net_socket.c:266 #: src/net_socket.c:282
#, c-format #, c-format
msgid "Could not set up a meta connection to %s" msgid "Could not set up a meta connection to %s"
msgstr "Kon geen metaverbinding aangaan met %s" msgstr "Kon geen metaverbinding aangaan met %s"
#: src/net_socket.c:300 #: src/net_socket.c:316
#, c-format #, c-format
msgid "Trying to connect to %s (%s)" msgid "Trying to connect to %s (%s)"
msgstr "Poging tot verbinden met %s (%s)" msgstr "Poging tot verbinden met %s (%s)"
#: src/net_socket.c:306 #: src/net_socket.c:322
#, c-format #, c-format
msgid "Creating socket for %s failed: %s" msgid "Creating socket for %s failed: %s"
msgstr "Aanmaken socket voor %s mislukt: %s" msgstr "Aanmaken socket voor %s mislukt: %s"
#: src/net_socket.c:328 #: src/net_socket.c:348
#, c-format #, c-format
msgid "%s: %s" msgid "%s: %s"
msgstr "%s: %s" msgstr "%s: %s"
#: src/net_socket.c:349 #: src/net_socket.c:369
#, c-format #, c-format
msgid "Already connected to %s" msgid "Already connected to %s"
msgstr "Reeds verbonden met %s" msgstr "Reeds verbonden met %s"
#: src/net_socket.c:368 #: src/net_socket.c:388
#, c-format #, c-format
msgid "No address specified for %s" msgid "No address specified for %s"
msgstr "Geen adres gespecificeerd voor %s" msgstr "Geen adres gespecificeerd voor %s"
#: src/net_socket.c:399 #: src/net_socket.c:419
#, c-format #, c-format
msgid "Accepting a new connection failed: %s" msgid "Accepting a new connection failed: %s"
msgstr "Aanname van nieuwe verbinding is mislukt: %s" msgstr "Aanname van nieuwe verbinding is mislukt: %s"
#: src/net_socket.c:418 #: src/net_socket.c:438
#, c-format #, c-format
msgid "Connection from %s" msgid "Connection from %s"
msgstr "Verbinding van %s" msgstr "Verbinding van %s"
#: src/net_socket.c:443 #: src/net_socket.c:463
#, c-format #, c-format
msgid "Invalid name for outgoing connection in %s line %d" msgid "Invalid name for outgoing connection in %s line %d"
msgstr "Ongeldige naam voor uitgaande verbinding in %s regel %d" msgstr "Ongeldige naam voor uitgaande verbinding in %s regel %d"
@ -1129,56 +1139,56 @@ msgstr "Kon pid bestand %s niet schrijven: %s\n"
msgid "tincd %s (%s %s) starting, debug level %d" msgid "tincd %s (%s %s) starting, debug level %d"
msgstr "tincd %s (%s %s) start, debug niveau %d" msgstr "tincd %s (%s %s) start, debug niveau %d"
#: src/process.c:385 #: src/process.c:387
#, c-format #, c-format
msgid "Executing script %s" msgid "Executing script %s"
msgstr "Uitvoeren script %s" msgstr "Uitvoeren script %s"
#: src/process.c:415 #: src/process.c:417
#, c-format #, c-format
msgid "Script %s exited with non-zero status %d" msgid "Script %s exited with non-zero status %d"
msgstr "Script %s beëindigde met status %d" msgstr "Script %s beëindigde met status %d"
#: src/process.c:420 #: src/process.c:422
#, c-format #, c-format
msgid "Script %s was killed by signal %d (%s)" msgid "Script %s was killed by signal %d (%s)"
msgstr "Script %s was gestopt door signaal %d (%s)" msgstr "Script %s was gestopt door signaal %d (%s)"
#: src/process.c:424 #: src/process.c:426
#, c-format #, c-format
msgid "Script %s terminated abnormally" msgid "Script %s terminated abnormally"
msgstr "Script %s abnormaal beëindigd" msgstr "Script %s abnormaal beëindigd"
#: src/process.c:444 src/process.c:453 src/process.c:494 src/process.c:500 #: src/process.c:446 src/process.c:455 src/process.c:496 src/process.c:502
#: src/process.c:518 #: src/process.c:520
#, c-format #, c-format
msgid "Got %s signal" msgid "Got %s signal"
msgstr "Kreeg %s signaal" msgstr "Kreeg %s signaal"
#: src/process.c:462 #: src/process.c:464
#, c-format #, c-format
msgid "Got another fatal signal %d (%s): not restarting." msgid "Got another fatal signal %d (%s): not restarting."
msgstr "Kreeg nog een fataal signaal %d (%s): geen herstart." msgstr "Kreeg nog een fataal signaal %d (%s): geen herstart."
#: src/process.c:471 #: src/process.c:473
#, c-format #, c-format
msgid "Got fatal signal %d (%s)" msgid "Got fatal signal %d (%s)"
msgstr "Kreeg fataal signaal %d (%s)" msgstr "Kreeg fataal signaal %d (%s)"
#: src/process.c:475 #: src/process.c:477
msgid "Trying to re-execute in 5 seconds..." msgid "Trying to re-execute in 5 seconds..."
msgstr "Poging tot herstarten over 5 seconden..." msgstr "Poging tot herstarten over 5 seconden..."
#: src/process.c:487 #: src/process.c:489
msgid "Not restarting." msgid "Not restarting."
msgstr "Geen herstart." msgstr "Geen herstart."
#: src/process.c:503 #: src/process.c:505
#, c-format #, c-format
msgid "Reverting to old debug level (%d)" msgid "Reverting to old debug level (%d)"
msgstr "Herstellen van oud debug niveau (%d)" msgstr "Herstellen van oud debug niveau (%d)"
#: src/process.c:509 #: src/process.c:511
#, c-format #, c-format
msgid "" msgid ""
"Temporarily setting debug level to 5. Kill me with SIGINT again to go back " "Temporarily setting debug level to 5. Kill me with SIGINT again to go back "
@ -1187,17 +1197,17 @@ msgstr ""
"Tijdelijk instellen debug niveau op 5. Zend nog een SIGINT signaal om niveau " "Tijdelijk instellen debug niveau op 5. Zend nog een SIGINT signaal om niveau "
"%d te herstellen." "%d te herstellen."
#: src/process.c:542 #: src/process.c:544
#, c-format #, c-format
msgid "Got unexpected signal %d (%s)" msgid "Got unexpected signal %d (%s)"
msgstr "Kreeg onverwacht signaal %d (%s)" msgstr "Kreeg onverwacht signaal %d (%s)"
#: src/process.c:548 #: src/process.c:550
#, c-format #, c-format
msgid "Ignored signal %d (%s)" msgid "Ignored signal %d (%s)"
msgstr "Signaal %d (%s) genegeerd" msgstr "Signaal %d (%s) genegeerd"
#: src/process.c:602 #: src/process.c:604
#, c-format #, c-format
msgid "Installing signal handler for signal %d (%s) failed: %s\n" msgid "Installing signal handler for signal %d (%s) failed: %s\n"
msgstr "Installeren van signaal afhandelaar voor signaal %d (%s) faalde: %s\n" msgstr "Installeren van signaal afhandelaar voor signaal %d (%s) faalde: %s\n"
@ -1368,22 +1378,22 @@ msgstr "%s is een %s"
#: src/linux/device.c:133 src/linux/device.c:144 src/linux/device.c:155 #: src/linux/device.c:133 src/linux/device.c:144 src/linux/device.c:155
#: src/solaris/device.c:125 src/bsd/device.c:152 src/bsd/device.c:181 #: src/solaris/device.c:125 src/bsd/device.c:152 src/bsd/device.c:181
#: src/bsd/device.c:210 src/cygwin/device.c:239 src/mingw/device.c:110 #: src/bsd/device.c:210 src/cygwin/device.c:239 src/mingw/device.c:112
#: src/mingw/device.c:323 src/raw_socket/device.c:102 #: src/mingw/device.c:325 src/raw_socket/device.c:102
#: src/uml_socket/device.c:239 #: src/uml_socket/device.c:239
#, c-format #, c-format
msgid "Error while reading from %s %s: %s" msgid "Error while reading from %s %s: %s"
msgstr "Fout tijdens lezen van %s %s: %s" msgstr "Fout tijdens lezen van %s %s: %s"
#: src/linux/device.c:166 src/solaris/device.c:150 src/bsd/device.c:224 #: src/linux/device.c:166 src/solaris/device.c:150 src/bsd/device.c:224
#: src/cygwin/device.c:248 src/mingw/device.c:333 src/raw_socket/device.c:111 #: src/cygwin/device.c:248 src/mingw/device.c:335 src/raw_socket/device.c:111
#: src/uml_socket/device.c:249 #: src/uml_socket/device.c:249
#, c-format #, c-format
msgid "Read packet of %d bytes from %s" msgid "Read packet of %d bytes from %s"
msgstr "Pakket van %d bytes gelezen van %s" msgstr "Pakket van %d bytes gelezen van %s"
#: src/linux/device.c:176 src/solaris/device.c:160 src/bsd/device.c:234 #: src/linux/device.c:176 src/solaris/device.c:160 src/bsd/device.c:234
#: src/cygwin/device.c:260 src/mingw/device.c:346 src/raw_socket/device.c:121 #: src/cygwin/device.c:260 src/mingw/device.c:348 src/raw_socket/device.c:121
#: src/uml_socket/device.c:267 #: src/uml_socket/device.c:267
#, c-format #, c-format
msgid "Writing packet of %d bytes to %s" msgid "Writing packet of %d bytes to %s"
@ -1397,21 +1407,21 @@ msgid "Can't write to %s %s: %s"
msgstr "Kan niet schrijven naar %s %s: %s" msgstr "Kan niet schrijven naar %s %s: %s"
#: src/linux/device.c:215 src/solaris/device.c:178 src/bsd/device.c:296 #: src/linux/device.c:215 src/solaris/device.c:178 src/bsd/device.c:296
#: src/cygwin/device.c:277 src/mingw/device.c:363 src/raw_socket/device.c:139 #: src/cygwin/device.c:277 src/mingw/device.c:365 src/raw_socket/device.c:139
#: src/uml_socket/device.c:288 #: src/uml_socket/device.c:288
#, c-format #, c-format
msgid "Statistics for %s %s:" msgid "Statistics for %s %s:"
msgstr "Statistieken voor %s %s:" msgstr "Statistieken voor %s %s:"
#: src/linux/device.c:216 src/solaris/device.c:179 src/bsd/device.c:297 #: src/linux/device.c:216 src/solaris/device.c:179 src/bsd/device.c:297
#: src/cygwin/device.c:278 src/mingw/device.c:364 src/raw_socket/device.c:140 #: src/cygwin/device.c:278 src/mingw/device.c:366 src/raw_socket/device.c:140
#: src/uml_socket/device.c:289 #: src/uml_socket/device.c:289
#, c-format #, c-format
msgid " total bytes in: %10d" msgid " total bytes in: %10d"
msgstr " totaal aantal bytes in: %10d" msgstr " totaal aantal bytes in: %10d"
#: src/linux/device.c:217 src/solaris/device.c:180 src/bsd/device.c:298 #: src/linux/device.c:217 src/solaris/device.c:180 src/bsd/device.c:298
#: src/cygwin/device.c:279 src/mingw/device.c:365 src/raw_socket/device.c:141 #: src/cygwin/device.c:279 src/mingw/device.c:367 src/raw_socket/device.c:141
#: src/uml_socket/device.c:290 #: src/uml_socket/device.c:290
#, c-format #, c-format
msgid " total bytes out: %10d" msgid " total bytes out: %10d"
@ -1475,7 +1485,7 @@ msgid "Unknown address family %x while reading packet from %s %s"
msgstr "Onbekende adresfamilie %x tijdens ontvangst pakket van %s %s" msgstr "Onbekende adresfamilie %x tijdens ontvangst pakket van %s %s"
#: src/bsd/device.c:240 src/bsd/device.c:277 src/cygwin/device.c:264 #: src/bsd/device.c:240 src/bsd/device.c:277 src/cygwin/device.c:264
#: src/mingw/device.c:350 #: src/mingw/device.c:352
#, c-format #, c-format
msgid "Error while writing to %s %s: %s" msgid "Error while writing to %s %s: %s"
msgstr "Fout tijdens schrijven naar %s %s: %s" msgstr "Fout tijdens schrijven naar %s %s: %s"
@ -1485,12 +1495,12 @@ msgstr "Fout tijdens schrijven naar %s %s: %s"
msgid "Unknown address family %x while writing packet to %s %s" msgid "Unknown address family %x while writing packet to %s %s"
msgstr "Onbekende adresfamiliy %x tijdens versturen pakket naar %s %s" msgstr "Onbekende adresfamiliy %x tijdens versturen pakket naar %s %s"
#: src/cygwin/device.c:71 src/mingw/device.c:157 #: src/cygwin/device.c:71 src/mingw/device.c:159
#, c-format #, c-format
msgid "Unable to read registry: %s" msgid "Unable to read registry: %s"
msgstr "Kon registry niet lezen: %s" msgstr "Kon registry niet lezen: %s"
#: src/cygwin/device.c:123 src/mingw/device.c:208 #: src/cygwin/device.c:123 src/mingw/device.c:210
msgid "No Windows tap device found!" msgid "No Windows tap device found!"
msgstr "Geen Windows tap apparaat gevonden!" msgstr "Geen Windows tap apparaat gevonden!"
@ -1499,7 +1509,7 @@ msgstr "Geen Windows tap apparaat gevonden!"
msgid "Could not open Windows tap device %s (%s) for writing: %s" msgid "Could not open Windows tap device %s (%s) for writing: %s"
msgstr "Kon Windows tap apparaat %s (%s) niet openen om te schrijven: %s" msgstr "Kon Windows tap apparaat %s (%s) niet openen om te schrijven: %s"
#: src/cygwin/device.c:158 src/mingw/device.c:233 #: src/cygwin/device.c:158 src/mingw/device.c:235
#, c-format #, c-format
msgid "Could not get MAC address from Windows tap device %s (%s): %s" msgid "Could not get MAC address from Windows tap device %s (%s): %s"
msgstr "Kon MAC adres niet achterhalen van Windows tap apparaat %s (%s): %s" msgstr "Kon MAC adres niet achterhalen van Windows tap apparaat %s (%s): %s"
@ -1517,20 +1527,20 @@ msgstr "Taplezer is geforked en draait."
msgid "Tap reader failed!" msgid "Tap reader failed!"
msgstr "Taplezer faalde!" msgstr "Taplezer faalde!"
#: src/cygwin/device.c:214 src/mingw/device.c:302 #: src/cygwin/device.c:214 src/mingw/device.c:304
msgid "Windows tap device" msgid "Windows tap device"
msgstr "Windows tap apparaat" msgstr "Windows tap apparaat"
#: src/cygwin/device.c:216 src/mingw/device.c:304 #: src/cygwin/device.c:216 src/mingw/device.c:306
#, c-format #, c-format
msgid "%s (%s) is a %s" msgid "%s (%s) is a %s"
msgstr "%s (%s) is een %s" msgstr "%s (%s) is een %s"
#: src/mingw/device.c:91 #: src/mingw/device.c:93
msgid "Tap reader running" msgid "Tap reader running"
msgstr "Taplezer draait" msgstr "Taplezer draait"
#: src/mingw/device.c:226 #: src/mingw/device.c:228
#, c-format #, c-format
msgid "%s (%s) is not a usable Windows tap device: %s" msgid "%s (%s) is not a usable Windows tap device: %s"
msgstr "%s (%s) is geen bruikbaar Windows tap apparaat: %s" msgstr "%s (%s) is geen bruikbaar Windows tap apparaat: %s"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: tinc-devel@tinc-vpn.org\n" "Report-Msgid-Bugs-To: tinc-devel@tinc-vpn.org\n"
"POT-Creation-Date: 2007-01-05 14:14+0100\n" "POT-Creation-Date: 2007-05-16 16:50+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -86,16 +86,16 @@ msgstr ""
msgid "BROADCAST" msgid "BROADCAST"
msgstr "" msgstr ""
#: src/connection.c:120 #: src/connection.c:123
msgid "Connections:" msgid "Connections:"
msgstr "" msgstr ""
#: src/connection.c:124 #: src/connection.c:127
#, c-format #, c-format
msgid " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d" msgid " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d"
msgstr "" msgstr ""
#: src/connection.c:129 #: src/connection.c:132
msgid "End of connections." msgid "End of connections."
msgstr "" msgstr ""
@ -200,7 +200,7 @@ msgstr ""
msgid "Flushing event queue" msgid "Flushing event queue"
msgstr "" msgstr ""
#: src/net.c:455 #: src/net.c:450
msgid "Unable to reread configuration file, exitting." msgid "Unable to reread configuration file, exitting."
msgstr "" msgstr ""
@ -279,13 +279,13 @@ msgstr ""
msgid "Setting outgoing packet priority to %d" msgid "Setting outgoing packet priority to %d"
msgstr "" msgstr ""
#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:129 #: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:135
#: src/net_socket.c:158 src/tincd.c:435 src/tincd.c:472 src/process.c:198 #: src/net_socket.c:164 src/tincd.c:435 src/tincd.c:472 src/process.c:198
#: src/process.c:231 src/process.c:428 src/bsd/device.c:93 #: src/process.c:231 src/process.c:430 src/bsd/device.c:93
#: src/bsd/device.c:112 src/cygwin/device.c:140 src/cygwin/device.c:171 #: src/bsd/device.c:112 src/cygwin/device.c:140 src/cygwin/device.c:171
#: src/mingw/device.c:73 src/mingw/device.c:82 src/mingw/device.c:87 #: src/mingw/device.c:73 src/mingw/device.c:80 src/mingw/device.c:86
#: src/mingw/device.c:256 src/mingw/device.c:263 src/mingw/device.c:268 #: src/mingw/device.c:258 src/mingw/device.c:265 src/mingw/device.c:270
#: src/mingw/device.c:275 src/mingw/device.c:284 src/mingw/device.c:291 #: src/mingw/device.c:277 src/mingw/device.c:286 src/mingw/device.c:293
#: src/uml_socket/device.c:89 src/uml_socket/device.c:103 #: src/uml_socket/device.c:89 src/uml_socket/device.c:103
#: src/uml_socket/device.c:130 src/uml_socket/device.c:194 #: src/uml_socket/device.c:130 src/uml_socket/device.c:194
#, c-format #, c-format
@ -446,86 +446,96 @@ msgstr ""
msgid "fcntl for %s: %s" msgid "fcntl for %s: %s"
msgstr "" msgstr ""
#: src/net_socket.c:90 #: src/net_socket.c:69
#, c-format
msgid "ioctlsocket for %s: WSA error %d"
msgstr ""
#: src/net_socket.c:96
#, c-format #, c-format
msgid "Creating metasocket failed: %s" msgid "Creating metasocket failed: %s"
msgstr "" msgstr ""
#: src/net_socket.c:109 src/net_socket.c:201 #: src/net_socket.c:115 src/net_socket.c:217
#, c-format #, c-format
msgid "Can't bind to interface %s: %s" msgid "Can't bind to interface %s: %s"
msgstr "" msgstr ""
#: src/net_socket.c:114 #: src/net_socket.c:120
msgid "BindToInterface not supported on this platform" msgid "BindToInterface not supported on this platform"
msgstr "" msgstr ""
#: src/net_socket.c:121 #: src/net_socket.c:127
#, c-format #, c-format
msgid "Can't bind to %s/tcp: %s" msgid "Can't bind to %s/tcp: %s"
msgstr "" msgstr ""
#: src/net_socket.c:148 #: src/net_socket.c:154
#, c-format #, c-format
msgid "Creating UDP socket failed: %s" msgid "Creating UDP socket failed: %s"
msgstr "" msgstr ""
#: src/net_socket.c:212 #: src/net_socket.c:174
#, c-format
msgid "Call to `%s' failed: WSA error %d"
msgstr ""
#: src/net_socket.c:228
#, c-format #, c-format
msgid "Can't bind to %s/udp: %s" msgid "Can't bind to %s/udp: %s"
msgstr "" msgstr ""
#: src/net_socket.c:239 #: src/net_socket.c:255
#, c-format #, c-format
msgid "Trying to re-establish outgoing connection in %d seconds" msgid "Trying to re-establish outgoing connection in %d seconds"
msgstr "" msgstr ""
#: src/net_socket.c:247 #: src/net_socket.c:263
#, c-format #, c-format
msgid "Connected to %s (%s)" msgid "Connected to %s (%s)"
msgstr "" msgstr ""
#: src/net_socket.c:266 #: src/net_socket.c:282
#, c-format #, c-format
msgid "Could not set up a meta connection to %s" msgid "Could not set up a meta connection to %s"
msgstr "" msgstr ""
#: src/net_socket.c:300 #: src/net_socket.c:316
#, c-format #, c-format
msgid "Trying to connect to %s (%s)" msgid "Trying to connect to %s (%s)"
msgstr "" msgstr ""
#: src/net_socket.c:306 #: src/net_socket.c:322
#, c-format #, c-format
msgid "Creating socket for %s failed: %s" msgid "Creating socket for %s failed: %s"
msgstr "" msgstr ""
#: src/net_socket.c:328 #: src/net_socket.c:348
#, c-format #, c-format
msgid "%s: %s" msgid "%s: %s"
msgstr "" msgstr ""
#: src/net_socket.c:349 #: src/net_socket.c:369
#, c-format #, c-format
msgid "Already connected to %s" msgid "Already connected to %s"
msgstr "" msgstr ""
#: src/net_socket.c:368 #: src/net_socket.c:388
#, c-format #, c-format
msgid "No address specified for %s" msgid "No address specified for %s"
msgstr "" msgstr ""
#: src/net_socket.c:399 #: src/net_socket.c:419
#, c-format #, c-format
msgid "Accepting a new connection failed: %s" msgid "Accepting a new connection failed: %s"
msgstr "" msgstr ""
#: src/net_socket.c:418 #: src/net_socket.c:438
#, c-format #, c-format
msgid "Connection from %s" msgid "Connection from %s"
msgstr "" msgstr ""
#: src/net_socket.c:443 #: src/net_socket.c:463
#, c-format #, c-format
msgid "Invalid name for outgoing connection in %s line %d" msgid "Invalid name for outgoing connection in %s line %d"
msgstr "" msgstr ""
@ -1084,73 +1094,73 @@ msgstr ""
msgid "tincd %s (%s %s) starting, debug level %d" msgid "tincd %s (%s %s) starting, debug level %d"
msgstr "" msgstr ""
#: src/process.c:385 #: src/process.c:387
#, c-format #, c-format
msgid "Executing script %s" msgid "Executing script %s"
msgstr "" msgstr ""
#: src/process.c:415 #: src/process.c:417
#, c-format #, c-format
msgid "Script %s exited with non-zero status %d" msgid "Script %s exited with non-zero status %d"
msgstr "" msgstr ""
#: src/process.c:420 #: src/process.c:422
#, c-format #, c-format
msgid "Script %s was killed by signal %d (%s)" msgid "Script %s was killed by signal %d (%s)"
msgstr "" msgstr ""
#: src/process.c:424 #: src/process.c:426
#, c-format #, c-format
msgid "Script %s terminated abnormally" msgid "Script %s terminated abnormally"
msgstr "" msgstr ""
#: src/process.c:444 src/process.c:453 src/process.c:494 src/process.c:500 #: src/process.c:446 src/process.c:455 src/process.c:496 src/process.c:502
#: src/process.c:518 #: src/process.c:520
#, c-format #, c-format
msgid "Got %s signal" msgid "Got %s signal"
msgstr "" msgstr ""
#: src/process.c:462 #: src/process.c:464
#, c-format #, c-format
msgid "Got another fatal signal %d (%s): not restarting." msgid "Got another fatal signal %d (%s): not restarting."
msgstr "" msgstr ""
#: src/process.c:471 #: src/process.c:473
#, c-format #, c-format
msgid "Got fatal signal %d (%s)" msgid "Got fatal signal %d (%s)"
msgstr "" msgstr ""
#: src/process.c:475 #: src/process.c:477
msgid "Trying to re-execute in 5 seconds..." msgid "Trying to re-execute in 5 seconds..."
msgstr "" msgstr ""
#: src/process.c:487 #: src/process.c:489
msgid "Not restarting." msgid "Not restarting."
msgstr "" msgstr ""
#: src/process.c:503 #: src/process.c:505
#, c-format #, c-format
msgid "Reverting to old debug level (%d)" msgid "Reverting to old debug level (%d)"
msgstr "" msgstr ""
#: src/process.c:509 #: src/process.c:511
#, c-format #, c-format
msgid "" msgid ""
"Temporarily setting debug level to 5. Kill me with SIGINT again to go back " "Temporarily setting debug level to 5. Kill me with SIGINT again to go back "
"to level %d." "to level %d."
msgstr "" msgstr ""
#: src/process.c:542 #: src/process.c:544
#, c-format #, c-format
msgid "Got unexpected signal %d (%s)" msgid "Got unexpected signal %d (%s)"
msgstr "" msgstr ""
#: src/process.c:548 #: src/process.c:550
#, c-format #, c-format
msgid "Ignored signal %d (%s)" msgid "Ignored signal %d (%s)"
msgstr "" msgstr ""
#: src/process.c:602 #: src/process.c:604
#, c-format #, c-format
msgid "Installing signal handler for signal %d (%s) failed: %s\n" msgid "Installing signal handler for signal %d (%s) failed: %s\n"
msgstr "" msgstr ""
@ -1308,22 +1318,22 @@ msgstr ""
#: src/linux/device.c:133 src/linux/device.c:144 src/linux/device.c:155 #: src/linux/device.c:133 src/linux/device.c:144 src/linux/device.c:155
#: src/solaris/device.c:125 src/bsd/device.c:152 src/bsd/device.c:181 #: src/solaris/device.c:125 src/bsd/device.c:152 src/bsd/device.c:181
#: src/bsd/device.c:210 src/cygwin/device.c:239 src/mingw/device.c:110 #: src/bsd/device.c:210 src/cygwin/device.c:239 src/mingw/device.c:112
#: src/mingw/device.c:323 src/raw_socket/device.c:102 #: src/mingw/device.c:325 src/raw_socket/device.c:102
#: src/uml_socket/device.c:239 #: src/uml_socket/device.c:239
#, c-format #, c-format
msgid "Error while reading from %s %s: %s" msgid "Error while reading from %s %s: %s"
msgstr "" msgstr ""
#: src/linux/device.c:166 src/solaris/device.c:150 src/bsd/device.c:224 #: src/linux/device.c:166 src/solaris/device.c:150 src/bsd/device.c:224
#: src/cygwin/device.c:248 src/mingw/device.c:333 src/raw_socket/device.c:111 #: src/cygwin/device.c:248 src/mingw/device.c:335 src/raw_socket/device.c:111
#: src/uml_socket/device.c:249 #: src/uml_socket/device.c:249
#, c-format #, c-format
msgid "Read packet of %d bytes from %s" msgid "Read packet of %d bytes from %s"
msgstr "" msgstr ""
#: src/linux/device.c:176 src/solaris/device.c:160 src/bsd/device.c:234 #: src/linux/device.c:176 src/solaris/device.c:160 src/bsd/device.c:234
#: src/cygwin/device.c:260 src/mingw/device.c:346 src/raw_socket/device.c:121 #: src/cygwin/device.c:260 src/mingw/device.c:348 src/raw_socket/device.c:121
#: src/uml_socket/device.c:267 #: src/uml_socket/device.c:267
#, c-format #, c-format
msgid "Writing packet of %d bytes to %s" msgid "Writing packet of %d bytes to %s"
@ -1337,21 +1347,21 @@ msgid "Can't write to %s %s: %s"
msgstr "" msgstr ""
#: src/linux/device.c:215 src/solaris/device.c:178 src/bsd/device.c:296 #: src/linux/device.c:215 src/solaris/device.c:178 src/bsd/device.c:296
#: src/cygwin/device.c:277 src/mingw/device.c:363 src/raw_socket/device.c:139 #: src/cygwin/device.c:277 src/mingw/device.c:365 src/raw_socket/device.c:139
#: src/uml_socket/device.c:288 #: src/uml_socket/device.c:288
#, c-format #, c-format
msgid "Statistics for %s %s:" msgid "Statistics for %s %s:"
msgstr "" msgstr ""
#: src/linux/device.c:216 src/solaris/device.c:179 src/bsd/device.c:297 #: src/linux/device.c:216 src/solaris/device.c:179 src/bsd/device.c:297
#: src/cygwin/device.c:278 src/mingw/device.c:364 src/raw_socket/device.c:140 #: src/cygwin/device.c:278 src/mingw/device.c:366 src/raw_socket/device.c:140
#: src/uml_socket/device.c:289 #: src/uml_socket/device.c:289
#, c-format #, c-format
msgid " total bytes in: %10d" msgid " total bytes in: %10d"
msgstr "" msgstr ""
#: src/linux/device.c:217 src/solaris/device.c:180 src/bsd/device.c:298 #: src/linux/device.c:217 src/solaris/device.c:180 src/bsd/device.c:298
#: src/cygwin/device.c:279 src/mingw/device.c:365 src/raw_socket/device.c:141 #: src/cygwin/device.c:279 src/mingw/device.c:367 src/raw_socket/device.c:141
#: src/uml_socket/device.c:290 #: src/uml_socket/device.c:290
#, c-format #, c-format
msgid " total bytes out: %10d" msgid " total bytes out: %10d"
@ -1415,7 +1425,7 @@ msgid "Unknown address family %x while reading packet from %s %s"
msgstr "" msgstr ""
#: src/bsd/device.c:240 src/bsd/device.c:277 src/cygwin/device.c:264 #: src/bsd/device.c:240 src/bsd/device.c:277 src/cygwin/device.c:264
#: src/mingw/device.c:350 #: src/mingw/device.c:352
#, c-format #, c-format
msgid "Error while writing to %s %s: %s" msgid "Error while writing to %s %s: %s"
msgstr "" msgstr ""
@ -1425,12 +1435,12 @@ msgstr ""
msgid "Unknown address family %x while writing packet to %s %s" msgid "Unknown address family %x while writing packet to %s %s"
msgstr "" msgstr ""
#: src/cygwin/device.c:71 src/mingw/device.c:157 #: src/cygwin/device.c:71 src/mingw/device.c:159
#, c-format #, c-format
msgid "Unable to read registry: %s" msgid "Unable to read registry: %s"
msgstr "" msgstr ""
#: src/cygwin/device.c:123 src/mingw/device.c:208 #: src/cygwin/device.c:123 src/mingw/device.c:210
msgid "No Windows tap device found!" msgid "No Windows tap device found!"
msgstr "" msgstr ""
@ -1439,7 +1449,7 @@ msgstr ""
msgid "Could not open Windows tap device %s (%s) for writing: %s" msgid "Could not open Windows tap device %s (%s) for writing: %s"
msgstr "" msgstr ""
#: src/cygwin/device.c:158 src/mingw/device.c:233 #: src/cygwin/device.c:158 src/mingw/device.c:235
#, c-format #, c-format
msgid "Could not get MAC address from Windows tap device %s (%s): %s" msgid "Could not get MAC address from Windows tap device %s (%s): %s"
msgstr "" msgstr ""
@ -1457,20 +1467,20 @@ msgstr ""
msgid "Tap reader failed!" msgid "Tap reader failed!"
msgstr "" msgstr ""
#: src/cygwin/device.c:214 src/mingw/device.c:302 #: src/cygwin/device.c:214 src/mingw/device.c:304
msgid "Windows tap device" msgid "Windows tap device"
msgstr "" msgstr ""
#: src/cygwin/device.c:216 src/mingw/device.c:304 #: src/cygwin/device.c:216 src/mingw/device.c:306
#, c-format #, c-format
msgid "%s (%s) is a %s" msgid "%s (%s) is a %s"
msgstr "" msgstr ""
#: src/mingw/device.c:91 #: src/mingw/device.c:93
msgid "Tap reader running" msgid "Tap reader running"
msgstr "" msgstr ""
#: src/mingw/device.c:226 #: src/mingw/device.c:228
#, c-format #, c-format
msgid "%s (%s) is not a usable Windows tap device: %s" msgid "%s (%s) is not a usable Windows tap device: %s"
msgstr "" msgstr ""

View file

@ -1,6 +1,6 @@
/* /*
connection.c -- connection list management connection.c -- connection list management
Copyright (C) 2000-2006 Guus Sliepen <guus@tinc-vpn.org>, Copyright (C) 2000-2007 Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans 2000-2005 Ivo Timmermans
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: connection.c 1456 2006-08-08 13:21:08Z guus $ $Id: connection.c 1508 2007-05-16 14:42:08Z guus $
*/ */
#include "system.h" #include "system.h"
@ -78,6 +78,9 @@ void free_connection(connection_t *c)
{ {
cp(); cp();
if(c->name)
free(c->name);
if(c->hostname) if(c->hostname)
free(c->hostname); free(c->hostname);

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: event.c 1469 2006-11-11 22:44:15Z guus $ $Id: event.c 1498 2007-02-14 09:20:20Z guus $
*/ */
#include "system.h" #include "system.h"
@ -57,6 +57,28 @@ void exit_events(void)
avl_delete_tree(event_tree); avl_delete_tree(event_tree);
} }
void flush_events(void)
{
avl_tree_t *to_flush;
event_t *event;
/*
* Events can be inserted from event handlers, so only flush events
* already in the priority queue.
*/
cp();
to_flush = event_tree;
init_events();
while (to_flush->head) {
event = to_flush->head->data;
event->handler(event->data);
avl_delete(to_flush, event);
}
avl_delete_tree(to_flush);
}
event_t *new_event(void) event_t *new_event(void)
{ {
cp(); cp();

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: event.h 1452 2006-04-26 13:52:58Z guus $ $Id: event.h 1498 2007-02-14 09:20:20Z guus $
*/ */
#ifndef __TINC_EVENT_H__ #ifndef __TINC_EVENT_H__
@ -38,6 +38,7 @@ typedef struct {
extern void init_events(void); extern void init_events(void);
extern void exit_events(void); extern void exit_events(void);
extern void flush_events(void);
extern event_t *new_event(void) __attribute__ ((__malloc__)); extern event_t *new_event(void) __attribute__ ((__malloc__));
extern void free_event(event_t *); extern void free_event(event_t *);
extern void event_add(event_t *); extern void event_add(event_t *);

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: device.c 1496 2007-01-05 13:18:36Z guus $ $Id: device.c 1510 2007-05-16 14:46:25Z guus $
*/ */
#include "system.h" #include "system.h"
@ -76,18 +76,20 @@ DWORD WINAPI tapreader(void *bla) {
sock = socket(ai->ai_family, SOCK_STREAM, IPPROTO_TCP); sock = socket(ai->ai_family, SOCK_STREAM, IPPROTO_TCP);
freeaddrinfo(ai);
if(sock < 0) { if(sock < 0) {
logger(LOG_ERR, _("System call `%s' failed: %s"), "socket", strerror(errno)); logger(LOG_ERR, _("System call `%s' failed: %s"), "socket", strerror(errno));
freeaddrinfo(ai);
return -1; return -1;
} }
if(connect(sock, ai->ai_addr, ai->ai_addrlen)) { if(connect(sock, ai->ai_addr, ai->ai_addrlen)) {
logger(LOG_ERR, _("System call `%s' failed: %s"), "connect", strerror(errno)); logger(LOG_ERR, _("System call `%s' failed: %s"), "connect", strerror(errno));
freeaddrinfo(ai);
return -1; return -1;
} }
freeaddrinfo(ai);
logger(LOG_DEBUG, _("Tap reader running")); logger(LOG_DEBUG, _("Tap reader running"));
/* Read from tap device and send to parent */ /* Read from tap device and send to parent */

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: net.c 1473 2006-11-29 16:57:46Z guus $ $Id: net.c 1498 2007-02-14 09:20:20Z guus $
*/ */
#include "system.h" #include "system.h"
@ -429,12 +429,7 @@ int main_loop(void)
if(sigalrm) { if(sigalrm) {
logger(LOG_INFO, _("Flushing event queue")); logger(LOG_INFO, _("Flushing event queue"));
flush_events();
while(event_tree->head) {
event = event_tree->head->data;
event->handler(event->data);
event_del(event);
}
sigalrm = false; sigalrm = false;
} }

View file

@ -1,7 +1,7 @@
/* /*
net_socket.c -- Handle various kinds of sockets. net_socket.c -- Handle various kinds of sockets.
Copyright (C) 1998-2005 Ivo Timmermans, Copyright (C) 1998-2005 Ivo Timmermans,
2000-2006 Guus Sliepen <guus@tinc-vpn.org> 2000-2007 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: net_socket.c 1460 2006-08-08 13:50:58Z guus $ $Id: net_socket.c 1508 2007-05-16 14:42:08Z guus $
*/ */
#include "system.h" #include "system.h"
@ -62,6 +62,12 @@ static void configure_tcp(connection_t *c)
if(fcntl(c->socket, F_SETFL, flags | O_NONBLOCK) < 0) { if(fcntl(c->socket, F_SETFL, flags | O_NONBLOCK) < 0) {
logger(LOG_ERR, _("fcntl for %s: %s"), c->hostname, strerror(errno)); logger(LOG_ERR, _("fcntl for %s: %s"), c->hostname, strerror(errno));
} }
#elif defined(WIN32)
unsigned long arg = 1;
if(ioctlsocket(c->socket, FIONBIO, &arg) != 0) {
logger(LOG_ERR, _("ioctlsocket for %s: WSA error %d"), c->hostname, WSAGetLastError());
}
#endif #endif
#if defined(SOL_TCP) && defined(TCP_NODELAY) #if defined(SOL_TCP) && defined(TCP_NODELAY)
@ -160,6 +166,16 @@ int setup_vpn_in_socket(const sockaddr_t *sa)
return -1; return -1;
} }
} }
#elif defined(WIN32)
{
unsigned long arg = 1;
if(ioctlsocket(nfd, FIONBIO, &arg) != 0) {
closesocket(nfd);
logger(LOG_ERR, _("Call to `%s' failed: WSA error %d"), "ioctlsocket",
WSAGetLastError());
return -1;
}
}
#endif #endif
option = 1; option = 1;
@ -318,7 +334,11 @@ begin:
result = connect(c->socket, &c->address.sa, SALEN(c->address.sa)); result = connect(c->socket, &c->address.sa, SALEN(c->address.sa));
if(result == -1) { if(result == -1) {
if(errno == EINPROGRESS) { if(errno == EINPROGRESS
#if defined(WIN32) && !defined(O_NONBLOCK)
|| WSAGetLastError() == WSAEWOULDBLOCK
#endif
) {
c->status.connecting = true; c->status.connecting = true;
return; return;
} }
@ -404,7 +424,7 @@ bool handle_new_meta_connection(int sock)
sockaddrunmap(&sa); sockaddrunmap(&sa);
c = new_connection(); c = new_connection();
c->name = NULL; c->name = xstrdup("<unknown>");
c->outcipher = myself->connection->outcipher; c->outcipher = myself->connection->outcipher;
c->outdigest = myself->connection->outdigest; c->outdigest = myself->connection->outdigest;
c->outmaclength = myself->connection->outmaclength; c->outmaclength = myself->connection->outmaclength;

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: process.c 1452 2006-04-26 13:52:58Z guus $ $Id: process.c 1499 2007-02-14 09:21:34Z guus $
*/ */
#include "system.h" #include "system.h"
@ -379,8 +379,10 @@ bool execute_script(const char *name, char **envp)
/* First check if there is a script */ /* First check if there is a script */
if(stat(scriptname + 1, &s)) if(stat(scriptname + 1, &s)) {
free(scriptname);
return true; return true;
}
ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name); ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name);

View file

@ -1,7 +1,7 @@
/* /*
protocol_auth.c -- handle the meta-protocol, authentication protocol_auth.c -- handle the meta-protocol, authentication
Copyright (C) 1999-2005 Ivo Timmermans, Copyright (C) 1999-2005 Ivo Timmermans,
2000-2006 Guus Sliepen <guus@tinc-vpn.org> 2000-2007 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: protocol_auth.c 1452 2006-04-26 13:52:58Z guus $ $Id: protocol_auth.c 1508 2007-05-16 14:42:08Z guus $
*/ */
#include "system.h" #include "system.h"
@ -68,9 +68,9 @@ bool id_h(connection_t *c)
return false; return false;
} }
/* If we set c->name in advance, make sure we are connected to the right host */ /* If this is an outgoing connection, make sure we are connected to the right host */
if(c->name) { if(c->outgoing) {
if(strcmp(c->name, name)) { if(strcmp(c->name, name)) {
logger(LOG_ERR, _("Peer %s is %s instead of %s"), c->hostname, name, logger(LOG_ERR, _("Peer %s is %s instead of %s"), c->hostname, name,
c->name); c->name);