From 6276954b047e3821e4f481f4e152fa696e4203ce Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 26 Aug 2019 13:44:38 +0200 Subject: [PATCH] Import Upstream version 1.0.8 --- ChangeLog | 50 ++++++++++++ NEWS | 6 ++ README | 6 +- config.guess | 32 ++++++-- config.sub | 16 ++-- configure | 2 +- configure.in | 2 +- doc/sample-config.tar.gz | Bin 1249 -> 1249 bytes doc/tinc.info | 160 +++++++++++++++++++-------------------- lib/pidfile.c | 14 ++-- po/nl.gmo | Bin 32575 -> 32749 bytes po/nl.po | 128 ++++++++++++++++--------------- po/tinc.pot | 126 ++++++++++++++++-------------- src/connection.c | 7 +- src/event.c | 24 +++++- src/event.h | 3 +- src/mingw/device.c | 8 +- src/net.c | 9 +-- src/net_socket.c | 28 ++++++- src/process.c | 6 +- src/protocol_auth.c | 8 +- 21 files changed, 390 insertions(+), 245 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32801d1..69db917 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/NEWS b/NEWS index fc13420..1183ab7 100644 --- a/NEWS +++ b/NEWS @@ -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 * Fixed a bug that caused slow network speeds on Windows. diff --git a/README b/README index d4eb084..1f523d7 100644 --- a/README +++ b/README @@ -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. -tinc is Copyright (C) 1998-2006 by: +tinc is Copyright (C) 1998-2007 by: Ivo Timmermans, Guus Sliepen , @@ -55,7 +55,7 @@ should be changed into "Device", and "Device" should be changed into 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. diff --git a/config.guess b/config.guess index 396482d..0f0fe71 100755 --- a/config.guess +++ b/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-07-02' +timestamp='2007-03-06' # 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 @@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -780,7 +781,7 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -790,12 +791,15 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -950,6 +954,9 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # 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 @@ -1208,6 +1215,15 @@ EOF SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} 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:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; diff --git a/config.sub b/config.sub index fab0aa3..5defff6 100755 --- a/config.sub +++ b/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-09-20' +timestamp='2007-01-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -245,12 +245,12 @@ case $basic_machine in | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -324,7 +324,7 @@ case $basic_machine in | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ @@ -925,6 +925,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1219,7 +1222,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -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. ;; -qnx*) @@ -1414,6 +1417,9 @@ case $basic_machine in m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; diff --git a/configure b/configure index f0cf540..0b2f01d 100755 --- a/configure +++ b/configure @@ -2107,7 +2107,7 @@ fi # Define the identity of the package. PACKAGE=tinc - VERSION=1.0.7 + VERSION=1.0.8 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index 8444ee3..6396ce8 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ dnl $Id: configure.in 1488 2006-12-16 16:53:58Z guus $ AC_PREREQ(2.61) AC_INIT 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]) AM_MAINTAINER_MODE diff --git a/doc/sample-config.tar.gz b/doc/sample-config.tar.gz index bc4437239233a87c77ce0f2f246141558a550142..a67d4297b7392920765fdeb4d684298cca0b8dcb 100644 GIT binary patch delta 17 YcmaFJ`H+)CzMF%=UCP^SBgah^05Ajv7XSbN delta 17 YcmaFJ`H+)CzMF&Ln%6wnjT|>w05`b?C;$Ke diff --git a/doc/tinc.info b/doc/tinc.info index 33f03a6..c547042 100644 --- a/doc/tinc.info +++ b/doc/tinc.info @@ -5,7 +5,7 @@ START-INFO-DIR-ENTRY * tinc: (tinc). The tinc Manual. 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. 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. The effect of this is that the daemon will set its configuration -root to `/usr/local/etc/tinc/NETNAME/', where NETNAME is your argument -to the -n option. You'll notice that it appears in syslog as -`tinc.NETNAME'. +root to `/etc/tinc/NETNAME/', where NETNAME is your argument to the -n +option. You'll notice that it appears in syslog as `tinc.NETNAME'. 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 -be used as such. tinc now looks for files in `/usr/local/etc/tinc/', -instead of `/usr/local/etc/tinc/NETNAME/'; the configuration file -should be `/usr/local/etc/tinc/tinc.conf', and the host configuration -files are now expected to be in `/usr/local/etc/tinc/hosts/'. +be used as such. tinc now looks for files in `/etc/tinc/', instead of +`/etc/tinc/NETNAME/'; the configuration file should be +`/etc/tinc/tinc.conf', and the host configuration files are now +expected to be in `/etc/tinc/hosts/'. 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, @@ -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 -`/usr/local/etc/tinc/NETNAME/tinc.conf' and at least one other file in -the directory `/usr/local/etc/tinc/NETNAME/hosts/'. +`/etc/tinc/NETNAME/tinc.conf' and at least one other file in the +directory `/etc/tinc/NETNAME/hosts/'. These file consists of comments (lines started with a #) or assignments in the form of @@ -867,7 +866,7 @@ PrivateKey = [obsolete] This prevents accidental eavesdropping if you are editting the configuration file. -PrivateKeyFile = (`/usr/local/etc/tinc/NETNAME/rsa_key.priv') +PrivateKeyFile = (`/etc/tinc/NETNAME/rsa_key.priv') 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 a relative directory. @@ -879,7 +878,7 @@ TunnelServer = (no) [experimental] When this option is enabled tinc will no longer forward information between other tinc daemons, and will only allow nodes 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 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 executed right after the tinc daemon has been started and has 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 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. -`/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 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 unreachable. -`/usr/local/etc/tinc/NETNAME/host-up' +`/etc/tinc/NETNAME/host-up' 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. -`/usr/local/etc/tinc/NETNAME/subnet-up' +`/etc/tinc/NETNAME/subnet-up' This script is started when a Subnet becomes reachable. The Subnet and the node it belongs to are passed in environment variables. -`/usr/local/etc/tinc/NETNAME/subnet-down' +`/etc/tinc/NETNAME/subnet-down' This script is started when a Subnet becomes unreachable. 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 -`/usr/local/etc/tinc/NETNAME/tinc.conf'. Adapt the following example -to create a basic configuration file: +`/etc/tinc/NETNAME/tinc.conf'. Adapt the following example to create a +basic configuration file: Name = YOURNAME 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 configuarion file, you will need to create a host configuration file -`/usr/local/etc/tinc/NETNAME/hosts/yourname'. Adapt the following -example to create a host configuration file: +`/etc/tinc/NETNAME/hosts/yourname'. Adapt the following example to +create a host configuration file: Address = your.real.hostname.org Subnet = 192.168.1.0/24 @@ -1122,10 +1121,10 @@ Network Connections control panel. You can configure the network interface by putting ordinary ifconfig, route, and other commands to a script named -`/usr/local/etc/tinc/NETNAME/tinc-up'. When tinc starts, this script -will be executed. When tinc exits, it will execute the script named -`/usr/local/etc/tinc/NETNAME/tinc-down', but normally you don't need to -create that script. +`/etc/tinc/NETNAME/tinc-up'. When tinc starts, this script will be +executed. When tinc exits, it will execute the script named +`/etc/tinc/NETNAME/tinc-down', but normally you don't need to create +that script. An example `tinc-up' script: @@ -1181,19 +1180,19 @@ For Branch A _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: # ifconfig eth0 10.1.54.1 netmask 255.255.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 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 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 ............ -In `/usr/local/etc/tinc/company/tinc-up': +In `/etc/tinc/company/tinc-up': # Real interface of internal network: # ifconfig eth0 10.2.43.8 netmask 255.255.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 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 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 Address = 2.3.4.5 @@ -1239,14 +1238,14 @@ connect to this node. For Branch C ............ -In `/usr/local/etc/tinc/company/tinc-up': +In `/etc/tinc/company/tinc-up': # Real interface of internal network: # ifconfig eth0 10.3.69.254 netmask 255.255.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 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 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 Subnet = 10.3.0.0/16 @@ -1269,14 +1268,14 @@ on from it's own host configuration file. For Branch D ............ -In `/usr/local/etc/tinc/company/tinc-up': +In `/etc/tinc/company/tinc-up': # Real interface of internal network: # ifconfig eth0 10.4.3.32 netmask 255.255.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 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 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 Address = 4.5.6.7 @@ -1305,12 +1304,11 @@ following command: tincd -n company -K - The private key is stored in -`/usr/local/etc/tinc/company/rsa_key.priv', the public key is put into -the host configuration file in the `/usr/local/etc/tinc/company/hosts/' -directory. During key generation, tinc automatically guesses the right -filenames based on the -n option and the Name directive in the -`tinc.conf' file (if it is available). + The private key is stored in `/etc/tinc/company/rsa_key.priv', the +public key is put into the host configuration file in the +`/etc/tinc/company/hosts/' directory. During key generation, tinc +automatically guesses the right filenames based on the -n option and +the Name directive in the `tinc.conf' file (if it is available). Starting ........ @@ -1357,7 +1355,7 @@ command line options. `-c, --config=PATH' Read configuration options from the directory PATH. The default is - `/usr/local/etc/tinc/NETNAME/'. + `/etc/tinc/NETNAME/'. `-D, --no-detach' Don't fork and detach. This will also disable the automatic @@ -1392,10 +1390,10 @@ command line options. `--logfile[=FILE]' Write log entries to a file instead of to the system logging facility. If FILE is omitted, the default is - `/usr/local/var/log/tinc.NETNAME.log'. + `/var/log/tinc.NETNAME.log'. `--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' Disables encryption and authentication. Only useful for debugging. @@ -2397,37 +2395,37 @@ Node: Other files21534 Node: Configuration22147 Node: Configuration introduction22458 Node: Multiple networks23731 -Node: How connections work25207 -Node: Configuration files26429 -Node: Main configuration variables27456 -Node: Host configuration variables33953 -Node: Scripts38249 -Node: How to configure41008 -Node: Generating keypairs42291 -Node: Network interfaces42790 -Node: Example configuration44658 -Node: Running tinc50110 -Node: Runtime options50700 -Node: Signals52737 -Node: Debug levels53806 -Node: Solving problems54742 -Node: Error messages56172 -Node: Sending bug reports60494 -Node: Technical information61446 -Node: The connection61677 -Node: The UDP tunnel61989 -Node: The meta-connection65050 -Node: The meta-protocol66519 -Node: Security71528 -Node: Authentication protocol72658 -Node: Encryption of network packets77662 -Node: Security issues79035 -Node: Platform specific information80652 -Node: Interface configuration80880 -Node: Routes82779 -Node: About us84695 -Node: Contact information84870 -Node: Authors85274 -Node: Concept Index85700 +Node: How connections work25157 +Node: Configuration files26379 +Node: Main configuration variables27386 +Node: Host configuration variables33863 +Node: Scripts38159 +Node: How to configure40838 +Node: Generating keypairs42101 +Node: Network interfaces42600 +Node: Example configuration44448 +Node: Running tinc49760 +Node: Runtime options50350 +Node: Signals52357 +Node: Debug levels53426 +Node: Solving problems54362 +Node: Error messages55792 +Node: Sending bug reports60114 +Node: Technical information61066 +Node: The connection61297 +Node: The UDP tunnel61609 +Node: The meta-connection64670 +Node: The meta-protocol66139 +Node: Security71148 +Node: Authentication protocol72278 +Node: Encryption of network packets77282 +Node: Security issues78655 +Node: Platform specific information80272 +Node: Interface configuration80500 +Node: Routes82399 +Node: About us84315 +Node: Contact information84490 +Node: Authors84894 +Node: Concept Index85320  End Tag Table diff --git a/lib/pidfile.c b/lib/pidfile.c index 61a802f..830d3f3 100644 --- a/lib/pidfile.c +++ b/lib/pidfile.c @@ -84,8 +84,12 @@ pid_t write_pid (char *pidfile) int fd; pid_t pid; - if ( ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1) - || ((f = fdopen(fd, "r+")) == NULL) ) { + if ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1) { + return 0; + } + + if ((f = fdopen(fd, "r+")) == NULL) { + close(fd); return 0; } @@ -98,18 +102,18 @@ pid_t write_pid (char *pidfile) pid = getpid(); if (!fprintf(f,"%ld\n", (long)pid)) { - close(fd); + fclose(f); return 0; } fflush(f); #ifdef HAVE_FLOCK if (flock(fd, LOCK_UN) == -1) { - close(fd); + fclose(f); return 0; } #endif - close(fd); + fclose(f); return pid; } diff --git a/po/nl.gmo b/po/nl.gmo index 2af40eea20100fbaf3d5a3c4206641716fca7373..29f19b70492ed61576f3f3086fa8588cb22a06ee 100644 GIT binary patch delta 6721 zcmZA62Y41m9>?)XC?SDB8iWuCFOW_kq!3EzA=10jdmtDDfZr9K{-M3 zu!A6q0xBvN?#O{?4na5%X`gXy=#1}D=_Dv-THSjGC$J#z##xY0_O&*5gL)aL%B7e*q{Ak3dFb99c6ztT( z82*@ie&~}~iF$9F^MEU_#Aw<#Karqq6VcK>n2GApAeWzts%ROe;szXyAK+AsYQ?f( zG4{Y0Fc+_2K4!(*nb?GV$sa?t*No}#)KFIvn)>0WDK13%WbQycxD~b52eE;lF%_sO zJQL3dFet&8CK!*(_e8xn0lQ)evfO5`vl8{(wFKtBA&GEmQw2%b341$BUHKklu;wW0 z#jB_W!dO_6CLJ|H<4~JyDXPJz(TDG%26zrNu$syC`S@hdCUPmzjcKS&v;wnnwadSc zYUl{+VEl~17~I+#jVezi@JrVv?XvjG{L*@vu-IgjnIK08>OxH~^oW#*us--xW9@%EEYgI}U5 z45XWy%1l&6Baphx64VTBLm$46z40PyreY43Vn=)nHIu)hmL!_#*8QQF zuJiveiGCEkhn+E$r#j$3)JX2a`dE&^_zY5)c@;TH<}0KxCX|KN^Es$ZIu3R27olcq zjq_vFOg3QyB+$O;LP8^(hS~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(M~$==TjP0D$1%)T0NzH_AF(uyrt%+R zP4%$I=<2bN;oh(Hr=1Tt)%`E7ywq9GEfgYn+H3ePVho|YJx*Lhuy+lM&zvA`C3X|V zgbrsT6ykYE10sVcr~Wjto?tKgkE8sCb1oF$w@v=9iYuDy zC>$Y95{}1eyO}s*2k5jHCej*a6r(+-DVM52(7SF$opQ191_=t!g zS`p(2zS)`~|L3e9ULkbcPyCH|l<366A444-3GJVjw2j9lL^jci`h2{aXh(T9&Lck4 z)0@)JhUiGVO5;Uh1EFJz#dP4@^RE0czE13Nb#a=QMQBs&gTSZRf3)ZKOX3i5hS*D7 zAif}Ue44}0zli}vBSJ?QagNwZ>>*N!nS?&pZxU_Typh$NqZ@hKsWm1h5cS7CS2%@l zyYdaF|1hc}&DodolSDOi-YoG7;<^_7>$B z%0sa+M!NRDQ?Ea|P#8=cB;Fx@Cl(Sf5@o~>L=91Y=>K^n602x*0POfuULHopXIz jIr&*RshzW`&kl(D|CX&W16wrSdR^Jll&!&4Cj\n" "Language-Team: Dutch\n" "MIME-Version: 1.0\n" @@ -90,16 +90,16 @@ msgstr "iedereen" msgid "BROADCAST" msgstr "BROADCAST" -#: src/connection.c:120 +#: src/connection.c:123 msgid "Connections:" msgstr "Verbindingen:" -#: src/connection.c:124 +#: src/connection.c:127 #, c-format 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" -#: src/connection.c:129 +#: src/connection.c:132 msgid "End of connections." msgstr "Einde van verbindingen." @@ -206,7 +206,7 @@ msgstr "Hergenereren symmetrische sleutel" msgid "Flushing event queue" msgstr "Legen taakrij" -#: src/net.c:455 +#: src/net.c:450 msgid "Unable to reread configuration file, exitting." 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" msgstr "Instellen prioriteit uitgaand pakket op %d" -#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:129 -#: src/net_socket.c:158 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/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:135 +#: src/net_socket.c:164 src/tincd.c:435 src/tincd.c:472 src/process.c:198 +#: 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/mingw/device.c:73 src/mingw/device.c:82 src/mingw/device.c:87 -#: src/mingw/device.c:256 src/mingw/device.c:263 src/mingw/device.c:268 -#: src/mingw/device.c:275 src/mingw/device.c:284 src/mingw/device.c:291 +#: src/mingw/device.c:73 src/mingw/device.c:80 src/mingw/device.c:86 +#: src/mingw/device.c:258 src/mingw/device.c:265 src/mingw/device.c:270 +#: 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:130 src/uml_socket/device.c:194 #, c-format @@ -455,86 +455,96 @@ msgstr "Kon geen enkele luistersocket aanmaken!" msgid "fcntl for %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 msgid "Creating metasocket failed: %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 msgid "Can't bind to interface %s: %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" msgstr "BindToInterface wordt niet ondersteund op dit platform" -#: src/net_socket.c:121 +#: src/net_socket.c:127 #, c-format msgid "Can't bind to %s/tcp: %s" msgstr "Kan niet aan %s/tcp binden: %s" -#: src/net_socket.c:148 +#: src/net_socket.c:154 #, c-format msgid "Creating UDP socket failed: %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 msgid "Can't bind to %s/udp: %s" msgstr "Kan niet aan %s/udp binden: %s" -#: src/net_socket.c:239 +#: src/net_socket.c:255 #, c-format msgid "Trying to re-establish outgoing connection in %d seconds" msgstr "Poging tot herstellen van uitgaande verbinding over %d seconden" -#: src/net_socket.c:247 +#: src/net_socket.c:263 #, c-format msgid "Connected to %s (%s)" msgstr "Verbonden met %s (%s)" -#: src/net_socket.c:266 +#: src/net_socket.c:282 #, c-format msgid "Could not set up a meta connection to %s" msgstr "Kon geen metaverbinding aangaan met %s" -#: src/net_socket.c:300 +#: src/net_socket.c:316 #, c-format msgid "Trying to connect to %s (%s)" msgstr "Poging tot verbinden met %s (%s)" -#: src/net_socket.c:306 +#: src/net_socket.c:322 #, c-format msgid "Creating socket for %s failed: %s" msgstr "Aanmaken socket voor %s mislukt: %s" -#: src/net_socket.c:328 +#: src/net_socket.c:348 #, c-format msgid "%s: %s" msgstr "%s: %s" -#: src/net_socket.c:349 +#: src/net_socket.c:369 #, c-format msgid "Already connected to %s" msgstr "Reeds verbonden met %s" -#: src/net_socket.c:368 +#: src/net_socket.c:388 #, c-format msgid "No address specified for %s" msgstr "Geen adres gespecificeerd voor %s" -#: src/net_socket.c:399 +#: src/net_socket.c:419 #, c-format msgid "Accepting a new connection failed: %s" msgstr "Aanname van nieuwe verbinding is mislukt: %s" -#: src/net_socket.c:418 +#: src/net_socket.c:438 #, c-format msgid "Connection from %s" msgstr "Verbinding van %s" -#: src/net_socket.c:443 +#: src/net_socket.c:463 #, c-format msgid "Invalid name for outgoing connection in %s line %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" msgstr "tincd %s (%s %s) start, debug niveau %d" -#: src/process.c:385 +#: src/process.c:387 #, c-format msgid "Executing script %s" msgstr "Uitvoeren script %s" -#: src/process.c:415 +#: src/process.c:417 #, c-format msgid "Script %s exited with non-zero status %d" msgstr "Script %s beëindigde met status %d" -#: src/process.c:420 +#: src/process.c:422 #, c-format msgid "Script %s was killed by signal %d (%s)" msgstr "Script %s was gestopt door signaal %d (%s)" -#: src/process.c:424 +#: src/process.c:426 #, c-format msgid "Script %s terminated abnormally" 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:518 +#: src/process.c:446 src/process.c:455 src/process.c:496 src/process.c:502 +#: src/process.c:520 #, c-format msgid "Got %s signal" msgstr "Kreeg %s signaal" -#: src/process.c:462 +#: src/process.c:464 #, c-format msgid "Got another fatal signal %d (%s): not restarting." msgstr "Kreeg nog een fataal signaal %d (%s): geen herstart." -#: src/process.c:471 +#: src/process.c:473 #, c-format msgid "Got fatal signal %d (%s)" msgstr "Kreeg fataal signaal %d (%s)" -#: src/process.c:475 +#: src/process.c:477 msgid "Trying to re-execute in 5 seconds..." msgstr "Poging tot herstarten over 5 seconden..." -#: src/process.c:487 +#: src/process.c:489 msgid "Not restarting." msgstr "Geen herstart." -#: src/process.c:503 +#: src/process.c:505 #, c-format msgid "Reverting to old debug level (%d)" msgstr "Herstellen van oud debug niveau (%d)" -#: src/process.c:509 +#: src/process.c:511 #, c-format msgid "" "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 " "%d te herstellen." -#: src/process.c:542 +#: src/process.c:544 #, c-format msgid "Got unexpected signal %d (%s)" msgstr "Kreeg onverwacht signaal %d (%s)" -#: src/process.c:548 +#: src/process.c:550 #, c-format msgid "Ignored signal %d (%s)" msgstr "Signaal %d (%s) genegeerd" -#: src/process.c:602 +#: src/process.c:604 #, c-format msgid "Installing signal handler for signal %d (%s) failed: %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/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/mingw/device.c:323 src/raw_socket/device.c:102 +#: src/bsd/device.c:210 src/cygwin/device.c:239 src/mingw/device.c:112 +#: src/mingw/device.c:325 src/raw_socket/device.c:102 #: src/uml_socket/device.c:239 #, c-format msgid "Error while reading from %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/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 #, c-format msgid "Read packet of %d bytes from %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/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 #, c-format 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" #: 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 #, c-format msgid "Statistics for %s %s:" msgstr "Statistieken voor %s %s:" #: 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 #, c-format msgid " total 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/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 #, c-format 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" #: 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 msgid "Error while writing to %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" 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 msgid "Unable to read registry: %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!" 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" 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 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" @@ -1517,20 +1527,20 @@ msgstr "Taplezer is geforked en draait." msgid "Tap reader failed!" 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" 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 msgid "%s (%s) is a %s" msgstr "%s (%s) is een %s" -#: src/mingw/device.c:91 +#: src/mingw/device.c:93 msgid "Tap reader running" msgstr "Taplezer draait" -#: src/mingw/device.c:226 +#: src/mingw/device.c:228 #, c-format msgid "%s (%s) is not a usable Windows tap device: %s" msgstr "%s (%s) is geen bruikbaar Windows tap apparaat: %s" diff --git a/po/tinc.pot b/po/tinc.pot index 1348e4a..ffa3b13 100644 --- a/po/tinc.pot +++ b/po/tinc.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -86,16 +86,16 @@ msgstr "" msgid "BROADCAST" msgstr "" -#: src/connection.c:120 +#: src/connection.c:123 msgid "Connections:" msgstr "" -#: src/connection.c:124 +#: src/connection.c:127 #, c-format msgid " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d" msgstr "" -#: src/connection.c:129 +#: src/connection.c:132 msgid "End of connections." msgstr "" @@ -200,7 +200,7 @@ msgstr "" msgid "Flushing event queue" msgstr "" -#: src/net.c:455 +#: src/net.c:450 msgid "Unable to reread configuration file, exitting." msgstr "" @@ -279,13 +279,13 @@ msgstr "" msgid "Setting outgoing packet priority to %d" msgstr "" -#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:129 -#: src/net_socket.c:158 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/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:135 +#: src/net_socket.c:164 src/tincd.c:435 src/tincd.c:472 src/process.c:198 +#: 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/mingw/device.c:73 src/mingw/device.c:82 src/mingw/device.c:87 -#: src/mingw/device.c:256 src/mingw/device.c:263 src/mingw/device.c:268 -#: src/mingw/device.c:275 src/mingw/device.c:284 src/mingw/device.c:291 +#: src/mingw/device.c:73 src/mingw/device.c:80 src/mingw/device.c:86 +#: src/mingw/device.c:258 src/mingw/device.c:265 src/mingw/device.c:270 +#: 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:130 src/uml_socket/device.c:194 #, c-format @@ -446,86 +446,96 @@ msgstr "" msgid "fcntl for %s: %s" 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 msgid "Creating metasocket failed: %s" msgstr "" -#: src/net_socket.c:109 src/net_socket.c:201 +#: src/net_socket.c:115 src/net_socket.c:217 #, c-format msgid "Can't bind to interface %s: %s" msgstr "" -#: src/net_socket.c:114 +#: src/net_socket.c:120 msgid "BindToInterface not supported on this platform" msgstr "" -#: src/net_socket.c:121 +#: src/net_socket.c:127 #, c-format msgid "Can't bind to %s/tcp: %s" msgstr "" -#: src/net_socket.c:148 +#: src/net_socket.c:154 #, c-format msgid "Creating UDP socket failed: %s" 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 msgid "Can't bind to %s/udp: %s" msgstr "" -#: src/net_socket.c:239 +#: src/net_socket.c:255 #, c-format msgid "Trying to re-establish outgoing connection in %d seconds" msgstr "" -#: src/net_socket.c:247 +#: src/net_socket.c:263 #, c-format msgid "Connected to %s (%s)" msgstr "" -#: src/net_socket.c:266 +#: src/net_socket.c:282 #, c-format msgid "Could not set up a meta connection to %s" msgstr "" -#: src/net_socket.c:300 +#: src/net_socket.c:316 #, c-format msgid "Trying to connect to %s (%s)" msgstr "" -#: src/net_socket.c:306 +#: src/net_socket.c:322 #, c-format msgid "Creating socket for %s failed: %s" msgstr "" -#: src/net_socket.c:328 +#: src/net_socket.c:348 #, c-format msgid "%s: %s" msgstr "" -#: src/net_socket.c:349 +#: src/net_socket.c:369 #, c-format msgid "Already connected to %s" msgstr "" -#: src/net_socket.c:368 +#: src/net_socket.c:388 #, c-format msgid "No address specified for %s" msgstr "" -#: src/net_socket.c:399 +#: src/net_socket.c:419 #, c-format msgid "Accepting a new connection failed: %s" msgstr "" -#: src/net_socket.c:418 +#: src/net_socket.c:438 #, c-format msgid "Connection from %s" msgstr "" -#: src/net_socket.c:443 +#: src/net_socket.c:463 #, c-format msgid "Invalid name for outgoing connection in %s line %d" msgstr "" @@ -1084,73 +1094,73 @@ msgstr "" msgid "tincd %s (%s %s) starting, debug level %d" msgstr "" -#: src/process.c:385 +#: src/process.c:387 #, c-format msgid "Executing script %s" msgstr "" -#: src/process.c:415 +#: src/process.c:417 #, c-format msgid "Script %s exited with non-zero status %d" msgstr "" -#: src/process.c:420 +#: src/process.c:422 #, c-format msgid "Script %s was killed by signal %d (%s)" msgstr "" -#: src/process.c:424 +#: src/process.c:426 #, c-format msgid "Script %s terminated abnormally" msgstr "" -#: src/process.c:444 src/process.c:453 src/process.c:494 src/process.c:500 -#: src/process.c:518 +#: src/process.c:446 src/process.c:455 src/process.c:496 src/process.c:502 +#: src/process.c:520 #, c-format msgid "Got %s signal" msgstr "" -#: src/process.c:462 +#: src/process.c:464 #, c-format msgid "Got another fatal signal %d (%s): not restarting." msgstr "" -#: src/process.c:471 +#: src/process.c:473 #, c-format msgid "Got fatal signal %d (%s)" msgstr "" -#: src/process.c:475 +#: src/process.c:477 msgid "Trying to re-execute in 5 seconds..." msgstr "" -#: src/process.c:487 +#: src/process.c:489 msgid "Not restarting." msgstr "" -#: src/process.c:503 +#: src/process.c:505 #, c-format msgid "Reverting to old debug level (%d)" msgstr "" -#: src/process.c:509 +#: src/process.c:511 #, c-format msgid "" "Temporarily setting debug level to 5. Kill me with SIGINT again to go back " "to level %d." msgstr "" -#: src/process.c:542 +#: src/process.c:544 #, c-format msgid "Got unexpected signal %d (%s)" msgstr "" -#: src/process.c:548 +#: src/process.c:550 #, c-format msgid "Ignored signal %d (%s)" msgstr "" -#: src/process.c:602 +#: src/process.c:604 #, c-format msgid "Installing signal handler for signal %d (%s) failed: %s\n" msgstr "" @@ -1308,22 +1318,22 @@ msgstr "" #: 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/bsd/device.c:210 src/cygwin/device.c:239 src/mingw/device.c:110 -#: src/mingw/device.c:323 src/raw_socket/device.c:102 +#: src/bsd/device.c:210 src/cygwin/device.c:239 src/mingw/device.c:112 +#: src/mingw/device.c:325 src/raw_socket/device.c:102 #: src/uml_socket/device.c:239 #, c-format msgid "Error while reading from %s %s: %s" msgstr "" #: 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 #, c-format msgid "Read packet of %d bytes from %s" msgstr "" #: 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 #, c-format msgid "Writing packet of %d bytes to %s" @@ -1337,21 +1347,21 @@ msgid "Can't write to %s %s: %s" msgstr "" #: 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 #, c-format msgid "Statistics for %s %s:" msgstr "" #: 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 #, c-format msgid " total bytes in: %10d" msgstr "" #: 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 #, c-format msgid " total bytes out: %10d" @@ -1415,7 +1425,7 @@ msgid "Unknown address family %x while reading packet from %s %s" msgstr "" #: 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 msgid "Error while writing to %s %s: %s" msgstr "" @@ -1425,12 +1435,12 @@ msgstr "" msgid "Unknown address family %x while writing packet to %s %s" msgstr "" -#: src/cygwin/device.c:71 src/mingw/device.c:157 +#: src/cygwin/device.c:71 src/mingw/device.c:159 #, c-format msgid "Unable to read registry: %s" 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!" msgstr "" @@ -1439,7 +1449,7 @@ msgstr "" msgid "Could not open Windows tap device %s (%s) for writing: %s" msgstr "" -#: src/cygwin/device.c:158 src/mingw/device.c:233 +#: src/cygwin/device.c:158 src/mingw/device.c:235 #, c-format msgid "Could not get MAC address from Windows tap device %s (%s): %s" msgstr "" @@ -1457,20 +1467,20 @@ msgstr "" msgid "Tap reader failed!" 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" msgstr "" -#: src/cygwin/device.c:216 src/mingw/device.c:304 +#: src/cygwin/device.c:216 src/mingw/device.c:306 #, c-format msgid "%s (%s) is a %s" msgstr "" -#: src/mingw/device.c:91 +#: src/mingw/device.c:93 msgid "Tap reader running" msgstr "" -#: src/mingw/device.c:226 +#: src/mingw/device.c:228 #, c-format msgid "%s (%s) is not a usable Windows tap device: %s" msgstr "" diff --git a/src/connection.c b/src/connection.c index ea26fc4..5eab8c0 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1,6 +1,6 @@ /* connection.c -- connection list management - Copyright (C) 2000-2006 Guus Sliepen , + Copyright (C) 2000-2007 Guus Sliepen , 2000-2005 Ivo Timmermans 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 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" @@ -78,6 +78,9 @@ void free_connection(connection_t *c) { cp(); + if(c->name) + free(c->name); + if(c->hostname) free(c->hostname); diff --git a/src/event.c b/src/event.c index 4fa2611..e4d4132 100644 --- a/src/event.c +++ b/src/event.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software 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" @@ -57,6 +57,28 @@ void exit_events(void) 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) { cp(); diff --git a/src/event.h b/src/event.h index b71a229..6e9b3f2 100644 --- a/src/event.h +++ b/src/event.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software 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__ @@ -38,6 +38,7 @@ typedef struct { extern void init_events(void); extern void exit_events(void); +extern void flush_events(void); extern event_t *new_event(void) __attribute__ ((__malloc__)); extern void free_event(event_t *); extern void event_add(event_t *); diff --git a/src/mingw/device.c b/src/mingw/device.c index c9fdc27..a9ff955 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software 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" @@ -76,18 +76,20 @@ DWORD WINAPI tapreader(void *bla) { sock = socket(ai->ai_family, SOCK_STREAM, IPPROTO_TCP); - freeaddrinfo(ai); - if(sock < 0) { logger(LOG_ERR, _("System call `%s' failed: %s"), "socket", strerror(errno)); + freeaddrinfo(ai); return -1; } if(connect(sock, ai->ai_addr, ai->ai_addrlen)) { logger(LOG_ERR, _("System call `%s' failed: %s"), "connect", strerror(errno)); + freeaddrinfo(ai); return -1; } + freeaddrinfo(ai); + logger(LOG_DEBUG, _("Tap reader running")); /* Read from tap device and send to parent */ diff --git a/src/net.c b/src/net.c index fce9a80..b2c4d8d 100644 --- a/src/net.c +++ b/src/net.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software 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" @@ -429,12 +429,7 @@ int main_loop(void) if(sigalrm) { logger(LOG_INFO, _("Flushing event queue")); - - while(event_tree->head) { - event = event_tree->head->data; - event->handler(event->data); - event_del(event); - } + flush_events(); sigalrm = false; } diff --git a/src/net_socket.c b/src/net_socket.c index 1685c46..56d0517 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -1,7 +1,7 @@ /* net_socket.c -- Handle various kinds of sockets. Copyright (C) 1998-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2007 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software 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" @@ -62,6 +62,12 @@ static void configure_tcp(connection_t *c) if(fcntl(c->socket, F_SETFL, flags | O_NONBLOCK) < 0) { 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 #if defined(SOL_TCP) && defined(TCP_NODELAY) @@ -160,6 +166,16 @@ int setup_vpn_in_socket(const sockaddr_t *sa) 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 option = 1; @@ -318,7 +334,11 @@ begin: result = connect(c->socket, &c->address.sa, SALEN(c->address.sa)); if(result == -1) { - if(errno == EINPROGRESS) { + if(errno == EINPROGRESS +#if defined(WIN32) && !defined(O_NONBLOCK) + || WSAGetLastError() == WSAEWOULDBLOCK +#endif + ) { c->status.connecting = true; return; } @@ -404,7 +424,7 @@ bool handle_new_meta_connection(int sock) sockaddrunmap(&sa); c = new_connection(); - c->name = NULL; + c->name = xstrdup(""); c->outcipher = myself->connection->outcipher; c->outdigest = myself->connection->outdigest; c->outmaclength = myself->connection->outmaclength; diff --git a/src/process.c b/src/process.c index 8eb7858..3a57fab 100644 --- a/src/process.c +++ b/src/process.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software 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" @@ -379,8 +379,10 @@ bool execute_script(const char *name, char **envp) /* First check if there is a script */ - if(stat(scriptname + 1, &s)) + if(stat(scriptname + 1, &s)) { + free(scriptname); return true; + } ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name); diff --git a/src/protocol_auth.c b/src/protocol_auth.c index a5d8fd4..f0bd4fa 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -1,7 +1,7 @@ /* protocol_auth.c -- handle the meta-protocol, authentication Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2007 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software 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" @@ -68,9 +68,9 @@ bool id_h(connection_t *c) 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)) { logger(LOG_ERR, _("Peer %s is %s instead of %s"), c->hostname, name, c->name);