Import Debian changes 1.0.34-1

tinc (1.0.34-1) unstable; urgency=medium

  [ Guus Sliepen ]
  * New upstream release.
    - Fixes a potential segmentation fault when connecting to an IPv6
      peer via a proxy. Closes: #887401
  * Add support for the $EXTRA variable in /etc/default/tinc when using
    systemd. Closes: #887116

  [ Benda Xu ]
  * Prevent possible incorrect IPv6 checksums due to function inlining.
    Closes: #891400
This commit is contained in:
Guus Sliepen 2018-06-12 23:00:49 +02:00
commit f8e1f5a528
42 changed files with 975 additions and 1108 deletions

View file

@ -1,4 +1,4 @@
Copyright (C) 1998-2017 Ivo Timmermans, Guus Sliepen and others. Copyright (C) 1998-2018 Ivo Timmermans, Guus Sliepen and others.
See the AUTHORS file for a complete list. See the AUTHORS file for a complete list.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under

View file

@ -1,3 +1,24 @@
Version 1.0.34 June 12 2018
------------------------------------------------------------------------
Guus Sliepen (10):
Add missing thanks to the NEWS message.
Fix building documentation when using OpenBSD's make.
Fix #ifdefs that were broken due to commit d178b58.
Don't use SOL_IP and SOL_IPV6.
Make systemd service file handling identical to tinc 1.1.
Rename distro/ to systemd/.
Document how to enable tinc at boot time using systemd.
Fix all spelling errors found by codespell.
Properly implement tinc.texi's dependency on tincinclude.texi.
Releasing 1.0.34.
Maximilian Stein (1):
Fix SEGFAULT when trying to connect to IPv6 peer in non-IPv6 environment
wangliushuai (1):
Remove redundant 'break'.
Version 1.0.33 November 04 2017 Version 1.0.33 November 04 2017
------------------------------------------------------------------------ ------------------------------------------------------------------------
@ -225,20 +246,7 @@ VittGam (1):
Version 1.0.24 May 11 2014 Version 1.0.24 May 11 2014
------------------------------------------------------------------------ ------------------------------------------------------------------------
Guus Sliepen (26): Guus Sliepen (13):
Mention in the manual that multiple Address staments are allowed.
If no Port is specified, set myport to actual port of first listening socket.
Enable compiler hardening flags by default.
Update support for Solaris.
Include <limits.h> for PATH_MAX.
Stricter check for raw socket support.
Use hardcoded value for TUNNEWPPA if net/if_tun.h is missing on Solaris.
Fix incorrectly merged bits from 80cd2ff73071941a5356555b85a00ee90dfd0e16.
Don't enable -fstack-protector-all.
Remove or lower the priority of some debug messages.
Clarify StrictSubnets.
Attribution for various contributors.
Handle errors from TAP-Win32/64 adapter in a better way.
Remove useless variable 'hard' from try_harder(). Remove useless variable 'hard' from try_harder().
Merge pull request #14 from luckyhacky/master Merge pull request #14 from luckyhacky/master
Add an autoconf check for res_init(). Add an autoconf check for res_init().
@ -258,22 +266,40 @@ Steffan Karger (3):
Use cryptographically strong random when generating keys. Use cryptographically strong random when generating keys.
Check RAND_bytes() return value, fail when getting random fails. Check RAND_bytes() return value, fail when getting random fails.
Florent Clairambault (2):
Adding "conf.d" configuration dir support.
Adding some documentation around the /etc/tinc/$NET/conf.d directory.
Armin Fisslthaler (1): Armin Fisslthaler (1):
reload /etc/resolv.conf in SIGALRM handler reload /etc/resolv.conf in SIGALRM handler
Loic Dachary (1): Loic Dachary (1):
fix documentation typo fix documentation typo
Vilbrekin (1):
Update android build instructions. Disable PIE as this is not supported on some devices.
luckyhacky (1): luckyhacky (1):
update to openssl version 1.0.1g due to lack of heartbleed bug in prior version of openssl update to openssl version 1.0.1g due to lack of heartbleed bug in prior version of openssl
refs/tags/1.0.23-android-1 March 11 2014
------------------------------------------------------------------------
Guus Sliepen (13):
Mention in the manual that multiple Address staments are allowed.
If no Port is specified, set myport to actual port of first listening socket.
Enable compiler hardening flags by default.
Update support for Solaris.
Include <limits.h> for PATH_MAX.
Stricter check for raw socket support.
Use hardcoded value for TUNNEWPPA if net/if_tun.h is missing on Solaris.
Fix incorrectly merged bits from 80cd2ff73071941a5356555b85a00ee90dfd0e16.
Don't enable -fstack-protector-all.
Remove or lower the priority of some debug messages.
Clarify StrictSubnets.
Attribution for various contributors.
Handle errors from TAP-Win32/64 adapter in a better way.
Florent Clairambault (2):
Adding "conf.d" configuration dir support.
Adding some documentation around the /etc/tinc/$NET/conf.d directory.
Vilbrekin (1):
Update android build instructions. Disable PIE as this is not supported on some devices.
Version 1.0.23 October 19 2013 Version 1.0.23 October 19 2013
------------------------------------------------------------------------ ------------------------------------------------------------------------

View file

@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = gnu AUTOMAKE_OPTIONS = gnu
SUBDIRS = src doc distro SUBDIRS = src doc systemd
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4

View file

@ -250,9 +250,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
@ -304,13 +301,13 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
systemdsystemunitdir = @systemdsystemunitdir@ systemd_path = @systemd_path@
target_alias = @target_alias@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = gnu AUTOMAKE_OPTIONS = gnu
SUBDIRS = src doc distro SUBDIRS = src doc systemd
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = COPYING.README README.android EXTRA_DIST = COPYING.README README.android
all: config.h all: config.h

16
NEWS
View file

@ -1,3 +1,14 @@
Version 1.0.34 June 12 2018
* Fix a potential segmentation fault when connecting to an IPv6 peer via a
proxy.
* Minor improvements to the build system.
* Make the systemd service file identical to the one from the 1.1 branch.
* Fix a potential problem causing IPv4 sockets to not work on macOS.
Thanks to Maximilian Stein and Wang Liu Shuai for their contributions to this
version of tinc.
Version 1.0.33 November 4 2017 Version 1.0.33 November 4 2017
* Allow compilation from a build directory. * Allow compilation from a build directory.
@ -7,6 +18,9 @@ Version 1.0.33 November 4 2017
* Disable PMTUDiscovery when TCPOnly is used. * Disable PMTUDiscovery when TCPOnly is used.
* Support the --runstatedir option of the autoconf 2.70. * Support the --runstatedir option of the autoconf 2.70.
Thanks to Rafael Sadowski and Pierre-Olivier Mercier for their contributions to
this version of tinc.
Version 1.0.32 September 2 2017 Version 1.0.32 September 2 2017
* Fix segmentation fault when using Cipher = none. * Fix segmentation fault when using Cipher = none.
@ -338,7 +352,7 @@ Version 1.0.9 Dec 26 2008
* Enable path MTU discovery by default. * Enable path MTU discovery by default.
* Fixed a memory leak that occured when connections were closed. * Fixed a memory leak that occurred when connections were closed.
Thanks to Max Rijevski for his contributions to this version of tinc. Thanks to Max Rijevski for his contributions to this version of tinc.

4
README
View file

@ -1,7 +1,7 @@
This is the README file for tinc version 1.0.33. Installation This is the README file for tinc version 1.0.34. Installation
instructions may be found in the INSTALL file. instructions may be found in the INSTALL file.
tinc is Copyright (C) 1998-2017 by: tinc is Copyright (C) 1998-2018 by:
Ivo Timmermans, Ivo Timmermans,
Guus Sliepen <guus@tinc-vpn.org>, Guus Sliepen <guus@tinc-vpn.org>,

276
aclocal.m4 vendored
View file

@ -20,282 +20,6 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
dnl serial 11 (pkg-config-0.29)
dnl
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
# Copyright (C) 2002-2017 Free Software Foundation, Inc. # Copyright (C) 2002-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation

584
config.guess vendored

File diff suppressed because it is too large Load diff

258
config.sub vendored
View file

@ -1,8 +1,8 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright 1992-2016 Free Software Foundation, Inc. # Copyright 1992-2018 Free Software Foundation, Inc.
timestamp='2016-11-04' timestamp='2018-02-22'
# 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
@ -15,7 +15,7 @@ timestamp='2016-11-04'
# General Public License for more details. # General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>. # along with this program; if not, see <https://www.gnu.org/licenses/>.
# #
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -33,7 +33,7 @@ timestamp='2016-11-04'
# Otherwise, we print the canonical config type on stdout and succeed. # Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from: # You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages # This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases # and recognize all the CPU types, system types and aliases
@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name. Canonicalize a configuration name.
Operation modes: Options:
-h, --help print this help, then exit -h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit -t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit -v, --version print version number, then exit
@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright 1992-2016 Free Software Foundation, Inc. Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -94,7 +94,7 @@ while test $# -gt 0 ; do
*local*) *local*)
# First pass through any local machine types. # First pass through any local machine types.
echo $1 echo "$1"
exit ;; exit ;;
* ) * )
@ -112,7 +112,7 @@ esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
@ -120,16 +120,16 @@ case $maybe_os in
kopensolaris*-gnu* | cloudabi*-eabi* | \ kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*) storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
android-linux) android-linux)
os=-linux-android os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;; ;;
*) *)
basic_machine=`echo $1 | sed 's/-[^-]*$//'` basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ] if [ "$basic_machine" != "$1" ]
then os=`echo $1 | sed 's/.*-/-/'` then os=`echo "$1" | sed 's/.*-/-/'`
else os=; fi else os=; fi
;; ;;
esac esac
@ -178,44 +178,44 @@ case $os in
;; ;;
-sco6) -sco6)
os=-sco5v6 os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco5) -sco5)
os=-sco3.2v5 os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco4) -sco4)
os=-sco3.2v4 os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco3.2.[4-9]*) -sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco3.2v[4-9]*) -sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer. # Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco5v6*) -sco5v6*)
# Don't forget version if it is 3.2v4 or newer. # Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco*) -sco*)
os=-sco3.2v2 os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-udk*) -udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-isc) -isc)
os=-isc2.2 os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-clix*) -clix*)
basic_machine=clipper-intergraph basic_machine=clipper-intergraph
;; ;;
-isc*) -isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-lynx*178) -lynx*178)
os=-lynxos178 os=-lynxos178
@ -227,10 +227,7 @@ case $os in
os=-lynxos os=-lynxos
;; ;;
-ptx*) -ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;; ;;
-psos*) -psos*)
os=-psos os=-psos
@ -263,7 +260,7 @@ case $basic_machine in
| fido | fr30 | frv | ft32 \ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \ | hexagon \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| k1om \ | k1om \
| le32 | le64 \ | le32 | le64 \
@ -299,7 +296,7 @@ case $basic_machine in
| nios | nios2 | nios2eb | nios2el \ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \ | ns16k | ns32k \
| open8 | or1k | or1knd | or32 \ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \ | pru \
| pyramid \ | pyramid \
@ -315,7 +312,7 @@ case $basic_machine in
| ubicom32 \ | ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \ | visium \
| we32k \ | wasm32 \
| x86 | xc16x | xstormy16 | xtensa \ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80) | z8k | z80)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
@ -336,7 +333,7 @@ case $basic_machine in
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
os=-none os=-none
;; ;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
;; ;;
ms1) ms1)
basic_machine=mt-unknown basic_machine=mt-unknown
@ -365,7 +362,7 @@ case $basic_machine in
;; ;;
# Object if more than one company name word. # Object if more than one company name word.
*-*-*) *-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1 exit 1
;; ;;
# Recognize the basic CPU types with company name. # Recognize the basic CPU types with company name.
@ -388,7 +385,7 @@ case $basic_machine in
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \ | ip2k-* | iq2000-* \
| k1om-* \ | k1om-* \
| le32-* | le64-* \ | le32-* | le64-* \
@ -446,6 +443,7 @@ case $basic_machine in
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \ | vax-* \
| visium-* \ | visium-* \
| wasm32-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \ | xstormy16-* | xtensa*-* \
@ -459,7 +457,7 @@ case $basic_machine in
# Recognize the various machine names and aliases which stand # Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS. # for a CPU type and a company and sometimes even an OS.
386bsd) 386bsd)
basic_machine=i386-unknown basic_machine=i386-pc
os=-bsd os=-bsd
;; ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@ -493,7 +491,7 @@ case $basic_machine in
basic_machine=x86_64-pc basic_machine=x86_64-pc
;; ;;
amd64-*) amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
amdahl) amdahl)
basic_machine=580-amdahl basic_machine=580-amdahl
@ -538,7 +536,7 @@ case $basic_machine in
os=-linux os=-linux
;; ;;
blackfin-*) blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux os=-linux
;; ;;
bluegene*) bluegene*)
@ -546,13 +544,13 @@ case $basic_machine in
os=-cnk os=-cnk
;; ;;
c54x-*) c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
c55x-*) c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
c6x-*) c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
c90) c90)
basic_machine=c90-cray basic_machine=c90-cray
@ -641,7 +639,7 @@ case $basic_machine in
basic_machine=rs6000-bull basic_machine=rs6000-bull
os=-bosx os=-bosx
;; ;;
dpx2* | dpx2*-bull) dpx2*)
basic_machine=m68k-bull basic_machine=m68k-bull
os=-sysv3 os=-sysv3
;; ;;
@ -650,7 +648,7 @@ case $basic_machine in
os=$os"spe" os=$os"spe"
;; ;;
e500v[12]-*) e500v[12]-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=$os"spe" os=$os"spe"
;; ;;
ebmon29k) ebmon29k)
@ -742,9 +740,6 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9]) hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp basic_machine=hppa1.0-hp
;; ;;
hppa-next)
os=-nextstep3
;;
hppaosf) hppaosf)
basic_machine=hppa1.1-hp basic_machine=hppa1.1-hp
os=-osf os=-osf
@ -757,26 +752,26 @@ case $basic_machine in
basic_machine=i370-ibm basic_machine=i370-ibm
;; ;;
i*86v32) i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv32 os=-sysv32
;; ;;
i*86v4*) i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv4 os=-sysv4
;; ;;
i*86v) i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv os=-sysv
;; ;;
i*86sol2) i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-solaris2 os=-solaris2
;; ;;
i386mach) i386mach)
basic_machine=i386-mach basic_machine=i386-mach
os=-mach os=-mach
;; ;;
i386-vsta | vsta) vsta)
basic_machine=i386-unknown basic_machine=i386-unknown
os=-vsta os=-vsta
;; ;;
@ -795,19 +790,16 @@ case $basic_machine in
os=-sysv os=-sysv
;; ;;
leon-*|leon[3-9]-*) leon-*|leon[3-9]-*)
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
;; ;;
m68knommu) m68knommu)
basic_machine=m68k-unknown basic_machine=m68k-unknown
os=-linux os=-linux
;; ;;
m68knommu-*) m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux os=-linux
;; ;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230) magnum | m3230)
basic_machine=mips-mips basic_machine=mips-mips
os=-sysv os=-sysv
@ -839,10 +831,10 @@ case $basic_machine in
os=-mint os=-mint
;; ;;
mips3*-*) mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
;; ;;
mips3*) mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;; ;;
monitor) monitor)
basic_machine=m68k-rom68k basic_machine=m68k-rom68k
@ -861,7 +853,7 @@ case $basic_machine in
os=-msdos os=-msdos
;; ;;
ms1-*) ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
;; ;;
msys) msys)
basic_machine=i686-pc basic_machine=i686-pc
@ -903,7 +895,7 @@ case $basic_machine in
basic_machine=v70-nec basic_machine=v70-nec
os=-sysv os=-sysv
;; ;;
next | m*-next ) next | m*-next)
basic_machine=m68k-next basic_machine=m68k-next
case $os in case $os in
-nextstep* ) -nextstep* )
@ -948,6 +940,12 @@ case $basic_machine in
nsr-tandem) nsr-tandem)
basic_machine=nsr-tandem basic_machine=nsr-tandem
;; ;;
nsv-tandem)
basic_machine=nsv-tandem
;;
nsx-tandem)
basic_machine=nsx-tandem
;;
op50n-* | op60c-*) op50n-* | op60c-*)
basic_machine=hppa1.1-oki basic_machine=hppa1.1-oki
os=-proelf os=-proelf
@ -980,7 +978,7 @@ case $basic_machine in
os=-linux os=-linux
;; ;;
parisc-*) parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux os=-linux
;; ;;
pbd) pbd)
@ -996,7 +994,7 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
;; ;;
pc98-*) pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pentium | p5 | k5 | k6 | nexgen | viac3) pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc basic_machine=i586-pc
@ -1011,16 +1009,16 @@ case $basic_machine in
basic_machine=i786-pc basic_machine=i786-pc
;; ;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pentiumpro-* | p6-* | 6x86-* | athlon-*) pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pentium4-*) pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pn) pn)
basic_machine=pn-gould basic_machine=pn-gould
@ -1030,23 +1028,23 @@ case $basic_machine in
ppc | ppcbe) basic_machine=powerpc-unknown ppc | ppcbe) basic_machine=powerpc-unknown
;; ;;
ppc-* | ppcbe-*) ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
ppcle | powerpclittle) ppcle | powerpclittle)
basic_machine=powerpcle-unknown basic_machine=powerpcle-unknown
;; ;;
ppcle-* | powerpclittle-*) ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
ppc64) basic_machine=powerpc64-unknown ppc64) basic_machine=powerpc64-unknown
;; ;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
ppc64le | powerpc64little) ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown basic_machine=powerpc64le-unknown
;; ;;
ppc64le-* | powerpc64little-*) ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
ps2) ps2)
basic_machine=i386-ibm basic_machine=i386-ibm
@ -1100,17 +1098,10 @@ case $basic_machine in
sequent) sequent)
basic_machine=i386-sequent basic_machine=i386-sequent
;; ;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sh5el) sh5el)
basic_machine=sh5le-unknown basic_machine=sh5le-unknown
;; ;;
sh64) simso-wrs)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs basic_machine=sparclite-wrs
os=-vxworks os=-vxworks
;; ;;
@ -1129,7 +1120,7 @@ case $basic_machine in
os=-sysv4 os=-sysv4
;; ;;
strongarm-* | thumb-*) strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
sun2) sun2)
basic_machine=m68000-sun basic_machine=m68000-sun
@ -1251,6 +1242,9 @@ case $basic_machine in
basic_machine=hppa1.1-winbond basic_machine=hppa1.1-winbond
os=-proelf os=-proelf
;; ;;
x64)
basic_machine=x86_64-pc
;;
xbox) xbox)
basic_machine=i686-pc basic_machine=i686-pc
os=-mingw32 os=-mingw32
@ -1259,20 +1253,12 @@ case $basic_machine in
basic_machine=xps100-honeywell basic_machine=xps100-honeywell
;; ;;
xscale-* | xscalee[bl]-*) xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
;; ;;
ymp) ymp)
basic_machine=ymp-cray basic_machine=ymp-cray
os=-unicos os=-unicos
;; ;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none) none)
basic_machine=none-none basic_machine=none-none
os=-none os=-none
@ -1301,10 +1287,6 @@ case $basic_machine in
vax) vax)
basic_machine=vax-dec basic_machine=vax-dec
;; ;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11) pdp11)
basic_machine=pdp11-dec basic_machine=pdp11-dec
;; ;;
@ -1314,9 +1296,6 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown basic_machine=sh-unknown
;; ;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra) cydra)
basic_machine=cydra-cydrome basic_machine=cydra-cydrome
;; ;;
@ -1336,7 +1315,7 @@ case $basic_machine in
# Make sure to match an already-canonicalized machine name. # Make sure to match an already-canonicalized machine name.
;; ;;
*) *)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1 exit 1
;; ;;
esac esac
@ -1344,10 +1323,10 @@ esac
# Here we canonicalize certain aliases for manufacturers. # Here we canonicalize certain aliases for manufacturers.
case $basic_machine in case $basic_machine in
*-digital*) *-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
;; ;;
*-commodore*) *-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
;; ;;
*) *)
;; ;;
@ -1358,8 +1337,8 @@ esac
if [ x"$os" != x"" ] if [ x"$os" != x"" ]
then then
case $os in case $os in
# First match some system type aliases # First match some system type aliases that might get confused
# that might get confused with valid system types. # with valid system types.
# -solaris* is a basic system type, with this one exception. # -solaris* is a basic system type, with this one exception.
-auroraux) -auroraux)
os=-auroraux os=-auroraux
@ -1370,18 +1349,19 @@ case $os in
-solaris) -solaris)
os=-solaris2 os=-solaris2
;; ;;
-svr4*)
os=-sysv4
;;
-unixware*) -unixware*)
os=-sysv4.2uw os=-sysv4.2uw
;; ;;
-gnu/linux*) -gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;; ;;
# First accept the basic system types. # es1800 is here to avoid being matched by es* (a different OS)
-es1800*)
os=-ose
;;
# Now accept the basic system types.
# The portable systems comes first. # The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number. # Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4. # -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
@ -1391,25 +1371,26 @@ case $os in
| -aos* | -aros* | -cloudabi* | -sortix* \ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos* | -phoenix* | -fuchsia*) | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
| -midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@ -1426,12 +1407,12 @@ case $os in
-nto*) -nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'` os=`echo $os | sed -e 's|nto|nto-qnx|'`
;; ;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -sim | -xray | -os68k* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -windows* | -osx | -abug | -netware* | -os9* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;; ;;
-mac*) -mac*)
os=`echo $os | sed -e 's|mac|macos|'` os=`echo "$os" | sed -e 's|mac|macos|'`
;; ;;
-linux-dietlibc) -linux-dietlibc)
os=-linux-dietlibc os=-linux-dietlibc
@ -1440,10 +1421,10 @@ case $os in
os=`echo $os | sed -e 's|linux|linux-gnu|'` os=`echo $os | sed -e 's|linux|linux-gnu|'`
;; ;;
-sunos5*) -sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'` os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;; ;;
-sunos6*) -sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'` os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;; ;;
-opened*) -opened*)
os=-openedition os=-openedition
@ -1454,12 +1435,6 @@ case $os in
-wince*) -wince*)
os=-wince os=-wince
;; ;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*) -utek*)
os=-bsd os=-bsd
;; ;;
@ -1484,7 +1459,7 @@ case $os in
-nova*) -nova*)
os=-rtmk-nova os=-rtmk-nova
;; ;;
-ns2 ) -ns2)
os=-nextstep2 os=-nextstep2
;; ;;
-nsk*) -nsk*)
@ -1506,7 +1481,7 @@ case $os in
-oss*) -oss*)
os=-sysv3 os=-sysv3
;; ;;
-svr4) -svr4*)
os=-sysv4 os=-sysv4
;; ;;
-svr3) -svr3)
@ -1521,24 +1496,28 @@ case $os in
-ose*) -ose*)
os=-ose os=-ose
;; ;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint os=-mint
;; ;;
-aros*)
os=-aros
;;
-zvmoe) -zvmoe)
os=-zvmoe os=-zvmoe
;; ;;
-dicos*) -dicos*)
os=-dicos os=-dicos
;; ;;
-pikeos*)
# Until real need of OS specific support for
# particular features comes up, bare metal
# configurations are quite functional.
case $basic_machine in
arm*)
os=-eabi
;;
*)
os=-elf
;;
esac
;;
-nacl*) -nacl*)
;; ;;
-ios) -ios)
@ -1548,7 +1527,7 @@ case $os in
*) *)
# Get rid of the `-' at the beginning of $os. # Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'` os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1 exit 1
;; ;;
esac esac
@ -1638,12 +1617,12 @@ case $basic_machine in
sparc-* | *-sun) sparc-* | *-sun)
os=-sunos4.1.1 os=-sunos4.1.1
;; ;;
pru-*)
os=-elf
;;
*-be) *-be)
os=-beos os=-beos
;; ;;
*-haiku)
os=-haiku
;;
*-ibm) *-ibm)
os=-aix os=-aix
;; ;;
@ -1683,7 +1662,7 @@ case $basic_machine in
m88k-omron*) m88k-omron*)
os=-luna os=-luna
;; ;;
*-next ) *-next)
os=-nextstep os=-nextstep
;; ;;
*-sequent) *-sequent)
@ -1698,9 +1677,6 @@ case $basic_machine in
i370-*) i370-*)
os=-mvs os=-mvs
;; ;;
*-next)
os=-nextstep3
;;
*-gould) *-gould)
os=-sysv os=-sysv
;; ;;
@ -1810,15 +1786,15 @@ case $basic_machine in
vendor=stratus vendor=stratus
;; ;;
esac esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;; ;;
esac esac
echo $basic_machine$os echo "$basic_machine$os"
exit exit
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='" # time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d" # time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'" # time-stamp-end: "'"

218
configure vendored
View file

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for tinc 1.0.33. # Generated by GNU Autoconf 2.69 for tinc 1.0.34.
# #
# #
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='tinc' PACKAGE_NAME='tinc'
PACKAGE_TARNAME='tinc' PACKAGE_TARNAME='tinc'
PACKAGE_VERSION='1.0.33' PACKAGE_VERSION='1.0.34'
PACKAGE_STRING='tinc 1.0.33' PACKAGE_STRING='tinc 1.0.34'
PACKAGE_BUGREPORT='' PACKAGE_BUGREPORT=''
PACKAGE_URL='' PACKAGE_URL=''
@ -625,6 +625,8 @@ LTLIBOBJS
LIBOBJS LIBOBJS
GETOPT_FALSE GETOPT_FALSE
GETOPT_TRUE GETOPT_TRUE
WITH_SYSTEMD_FALSE
WITH_SYSTEMD_TRUE
TUNEMU_FALSE TUNEMU_FALSE
TUNEMU_TRUE TUNEMU_TRUE
VDE_FALSE VDE_FALSE
@ -641,9 +643,7 @@ BSD_FALSE
BSD_TRUE BSD_TRUE
LINUX_FALSE LINUX_FALSE
LINUX_TRUE LINUX_TRUE
HAVE_SYSTEMD_FALSE systemd_path
HAVE_SYSTEMD_TRUE
systemdsystemunitdir
host_os host_os
host_vendor host_vendor
host_cpu host_cpu
@ -652,9 +652,6 @@ build_os
build_vendor build_vendor
build_cpu build_cpu
build build
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
EGREP EGREP
GREP GREP
CPP CPP
@ -750,7 +747,7 @@ enable_uml
enable_vde enable_vde
enable_tunemu enable_tunemu
with_windows2000 with_windows2000
with_systemdsystemunitdir with_systemd
enable_hardening enable_hardening
enable_zlib enable_zlib
with_zlib with_zlib
@ -773,10 +770,7 @@ CFLAGS
LDFLAGS LDFLAGS
LIBS LIBS
CPPFLAGS CPPFLAGS
CPP CPP'
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR'
# Initialize some variables set by options. # Initialize some variables set by options.
@ -1327,7 +1321,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures tinc 1.0.33 to adapt to many kinds of systems. \`configure' configures tinc 1.0.34 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1398,7 +1392,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of tinc 1.0.33:";; short | recursive ) echo "Configuration of tinc 1.0.34:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1426,8 +1420,7 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-windows2000 compile with support for Windows 2000. This disables --with-windows2000 compile with support for Windows 2000. This disables
support for tunneling over existing IPv6 networks. support for tunneling over existing IPv6 networks.
--with-systemdsystemunitdir=DIR --with-systemd[=DIR] install systemd service files [to DIR if specified]
Directory for systemd service files
--with-zlib=DIR zlib base directory, or: --with-zlib=DIR zlib base directory, or:
--with-zlib-include=DIR zlib headers directory --with-zlib-include=DIR zlib headers directory
--with-zlib-lib=DIR zlib library directory --with-zlib-lib=DIR zlib library directory
@ -1449,11 +1442,6 @@ Some influential environment variables:
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir> you have headers in a nonstandard directory <include dir>
CPP C preprocessor CPP C preprocessor
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
Use these variables to override the choices made by `configure' or to help Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations. it to find libraries and programs with nonstandard names/locations.
@ -1521,7 +1509,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
tinc configure 1.0.33 tinc configure 1.0.34
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@ -1986,7 +1974,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by tinc $as_me 1.0.33, which was It was created by tinc $as_me 1.0.34, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@ -2850,7 +2838,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='tinc' PACKAGE='tinc'
VERSION='1.0.33' VERSION='1.0.34'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -4811,127 +4799,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
# Make sure we can run config.sub. # Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
@ -5155,37 +5022,24 @@ fi
# Check whether --with-systemdsystemunitdir was given. # Check whether --with-systemd was given.
if test "${with_systemdsystemunitdir+set}" = set; then : if test "${with_systemd+set}" = set; then :
withval=$with_systemdsystemunitdir; withval=$with_systemd; systemd=true; systemd_path="$with_systemd"
else else
with_systemdsystemunitdir=auto systemd=false
fi fi
if test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"; then :
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) if test "x$with_systemd" = "xyes"; then :
systemd_path="\${libdir}/systemd/system"
if test "x$def_systemdsystemunitdir" = "x"; then :
if test "x$with_systemdsystemunitdir" = "xyes"; then :
as_fn_error $? "systemd support requested but pkg-config unable to query systemd package" "$LINENO" 5
fi
with_systemdsystemunitdir=no
else else
with_systemdsystemunitdir="$def_systemdsystemunitdir" if test "x$with_systemd" = "xno"; then :
systemd=false
fi fi
fi fi
if test "x$with_systemdsystemunitdir" != "xno"; then :
systemdsystemunitdir=$with_systemdsystemunitdir
fi systemd_path=$systemd_path
if test "x$with_systemdsystemunitdir" != "xno"; then
HAVE_SYSTEMD_TRUE=
HAVE_SYSTEMD_FALSE='#'
else
HAVE_SYSTEMD_TRUE='#'
HAVE_SYSTEMD_FALSE=
fi
if test "$linux" = true; then if test "$linux" = true; then
@ -5252,6 +5106,14 @@ else
TUNEMU_FALSE= TUNEMU_FALSE=
fi fi
if test "$systemd" = true; then
WITH_SYSTEMD_TRUE=
WITH_SYSTEMD_FALSE='#'
else
WITH_SYSTEMD_TRUE='#'
WITH_SYSTEMD_FALSE=
fi
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
@ -6898,7 +6760,7 @@ if test "x$runstatedir" = "x"; then
fi fi
ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile distro/Makefile" ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile systemd/Makefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
@ -7034,10 +6896,6 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined. as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi fi
if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then
as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${LINUX_TRUE}" && test -z "${LINUX_FALSE}"; then if test -z "${LINUX_TRUE}" && test -z "${LINUX_FALSE}"; then
as_fn_error $? "conditional \"LINUX\" was never defined. as_fn_error $? "conditional \"LINUX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -7070,6 +6928,10 @@ if test -z "${TUNEMU_TRUE}" && test -z "${TUNEMU_FALSE}"; then
as_fn_error $? "conditional \"TUNEMU\" was never defined. as_fn_error $? "conditional \"TUNEMU\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi fi
if test -z "${WITH_SYSTEMD_TRUE}" && test -z "${WITH_SYSTEMD_FALSE}"; then
as_fn_error $? "conditional \"WITH_SYSTEMD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${GETOPT_TRUE}" && test -z "${GETOPT_FALSE}"; then if test -z "${GETOPT_TRUE}" && test -z "${GETOPT_FALSE}"; then
as_fn_error $? "conditional \"GETOPT\" was never defined. as_fn_error $? "conditional \"GETOPT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -7471,7 +7333,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by tinc $as_me 1.0.33, which was This file was extended by tinc $as_me 1.0.34, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -7537,7 +7399,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
tinc config.status 1.0.33 tinc config.status 1.0.34
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
@ -7671,7 +7533,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"distro/Makefile") CONFIG_FILES="$CONFIG_FILES distro/Makefile" ;; "systemd/Makefile") CONFIG_FILES="$CONFIG_FILES systemd/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac esac

View file

@ -1,9 +1,9 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61) AC_PREREQ(2.61)
AC_INIT([tinc], [1.0.33]) AC_INIT([tinc], [1.0.34])
AC_CONFIG_SRCDIR([src/tincd.c]) AC_CONFIG_SRCDIR([src/tincd.c])
AM_INIT_AUTOMAKE([1.11 check-news std-options subdir-objects nostdinc silent-rules -Wall info-in-builddir]) AM_INIT_AUTOMAKE([1.11 check-news std-options subdir-objects nostdinc silent-rules -Wall])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_SILENT_RULES([yes]) AM_SILENT_RULES([yes])
@ -21,8 +21,6 @@ AC_PROG_INSTALL
AM_PROG_CC_C_O AM_PROG_CC_C_O
PKG_PROG_PKG_CONFIG
dnl Check and set OS dnl Check and set OS
AC_CANONICAL_HOST AC_CANONICAL_HOST
@ -116,20 +114,16 @@ AC_ARG_WITH(windows2000,
] ]
) )
AC_ARG_WITH([systemdsystemunitdir], AC_ARG_WITH(systemd,
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],, AS_HELP_STRING([--with-systemd@<:@=DIR@:>@], [install systemd service files @<:@to DIR if specified@:>@]),
[with_systemdsystemunitdir=auto]) [ systemd=true; systemd_path="$with_systemd" ],
AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [ [ systemd=false ]
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) )
AS_IF([test "x$def_systemdsystemunitdir" = "x"], AS_IF([test "x$with_systemd" = "xyes"], [systemd_path="\${libdir}/systemd/system"],
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], [AS_IF([test "x$with_systemd" = "xno"], [systemd=false])])
[AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
with_systemdsystemunitdir=no], AC_SUBST(systemd_path, $systemd_path)
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
AM_CONDITIONAL(LINUX, test "$linux" = true) AM_CONDITIONAL(LINUX, test "$linux" = true)
AM_CONDITIONAL(BSD, test "$bsd" = true) AM_CONDITIONAL(BSD, test "$bsd" = true)
@ -139,6 +133,7 @@ AM_CONDITIONAL(CYGWIN, test "$cygwin" = true)
AM_CONDITIONAL(UML, test "$uml" = true) AM_CONDITIONAL(UML, test "$uml" = true)
AM_CONDITIONAL(VDE, test "$vde" = true) AM_CONDITIONAL(VDE, test "$vde" = true)
AM_CONDITIONAL(TUNEMU, test "$tunemu" = true) AM_CONDITIONAL(TUNEMU, test "$tunemu" = true)
AM_CONDITIONAL(WITH_SYSTEMD, test "$systemd" = true)
AC_CACHE_SAVE AC_CACHE_SAVE
@ -247,6 +242,6 @@ if test "x$runstatedir" = "x"; then
AC_SUBST([runstatedir], ['${localstatedir}/run']) AC_SUBST([runstatedir], ['${localstatedir}/run'])
fi fi
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile distro/Makefile]) AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile systemd/Makefile])
AC_OUTPUT AC_OUTPUT

15
debian/changelog vendored
View file

@ -1,3 +1,18 @@
tinc (1.0.34-1) unstable; urgency=medium
[ Guus Sliepen ]
* New upstream release.
- Fixes a potential segmentation fault when connecting to an IPv6
peer via a proxy. Closes: #887401
* Add support for the $EXTRA variable in /etc/default/tinc when using
systemd. Closes: #887116
[ Benda Xu ]
* Prevent possible incorrect IPv6 checksums due to function inlining.
Closes: #891400
-- Guus Sliepen <guus@debian.org> Tue, 12 Jun 2018 23:00:49 +0200
tinc (1.0.33-1) unstable; urgency=medium tinc (1.0.33-1) unstable; urgency=medium
* New upstream release. * New upstream release.

3
debian/control vendored
View file

@ -2,9 +2,10 @@ Source: tinc
Section: net Section: net
Priority: optional Priority: optional
Maintainer: Guus Sliepen <guus@debian.org> Maintainer: Guus Sliepen <guus@debian.org>
Standards-Version: 4.1.1 Standards-Version: 4.1.3
Build-Depends: libssl-dev, debhelper (>= 10), gettext, texinfo, zlib1g-dev, liblzo2-dev, libvdeplug-dev Build-Depends: libssl-dev, debhelper (>= 10), gettext, texinfo, zlib1g-dev, liblzo2-dev, libvdeplug-dev
Homepage: http://www.tinc-vpn.org/ Homepage: http://www.tinc-vpn.org/
Rules-Requires-Root: no
Package: tinc Package: tinc
Architecture: any Architecture: any

View file

@ -0,0 +1,65 @@
Package: tinc
Version: 1.0.33-1
Severity: important
Dear Guus,
I have been using tinc since 2009 and it is great!
When PMTUDiscovery=yes and Mode=switch, and if ipv6 is used inside
tinc, the ICMPv6 "Packet Too Big" packets have incorrect checksums.
It can be reproduced by `ping6 <host in tinc> -s 1800` and `tcpdump -i
<tinc interface>`. Consequently, the host ignores the tinc-generated
ICMPv6 packets, PMTUDiscovery does not work and the connections freeze
when data flows are big.
I find the bug is gone if the function "inet_checksum" in route.c is
not inlined, either by compiling tinc with "-O2
-fno-inline-functions", or apply a patch such as,
diff --git a/src/route.c b/src/route.c
index ff82c06e..cd55383a 100644
--- a/src/route.c
+++ b/src/route.c
@@ -60,7 +60,7 @@ static const size_t opt_size = sizeof(struct nd_opt_hdr);
/* RFC 1071 */
-static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) {
+__attribute__ ((noinline)) static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) {
uint16_t *p = data;
uint32_t checksum = prevsum ^ 0xFFFF;
I have tested with gcc-7.3.0 and gcc-5.4.0. They behaved the same. I
am not good at assembly to find out what really happened, but it is
for sure that inet_checksum does not work as expected if compiled
inline.
Thanks!
Yours,
Benda
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages tinc depends on:
ii libc6 2.26-2
ii liblzo2-2 2.08-1.2+b2
ii libssl1.1 1.1.0g-2
ii lsb-base 9.20170808
ii zlib1g 1:1.2.8.dfsg-5
tinc recommends no packages.
tinc suggests no packages.

View file

@ -0,0 +1,2 @@
fix-incorrect-icmpv6-checksum
support-etc-defaults-tinc

View file

@ -0,0 +1,12 @@
--- a/systemd/tinc@.service.in
+++ b/systemd/tinc@.service.in
@@ -9,7 +9,8 @@
[Service]
Type=simple
WorkingDirectory=@sysconfdir@/tinc/%i
-ExecStart=@sbindir@/tincd -n %i -D
+EnvironmentFile=/etc/default/tinc
+ExecStart=@sbindir@/tincd -n %i -D $EXTRA
ExecReload=@sbindir@/tincd -n %i -kHUP
KillMode=mixed
Restart=on-failure

2
debian/rules vendored
View file

@ -4,7 +4,7 @@
dh $@ dh $@
override_dh_auto_configure: override_dh_auto_configure:
dh_auto_configure -- --enable-uml --enable-vde --with-systemdsystemunitdir=/lib/systemd/system --runstatedir=/run dh_auto_configure -- --enable-uml --enable-vde --with-systemd=/lib/systemd/system --runstatedir=/run
override_dh_auto_install: override_dh_auto_install:
dh_auto_install -- install-html dh_auto_install -- install-html

View file

@ -1,9 +0,0 @@
EXTRA_DIST = \
tinc.service \
tinc@.service
if HAVE_SYSTEMD
systemdsystemunit_DATA = \
tinc.service \
tinc@.service
endif

View file

@ -1,17 +0,0 @@
[Unit]
Description=Tinc net %i
PartOf=tinc.service
ReloadPropagatedFrom=tinc.service
[Service]
Type=simple
WorkingDirectory=/etc/tinc/%i
ExecStart=/usr/sbin/tincd -n %i -D
ExecReload=/usr/sbin/tincd -n %i -kHUP
KillMode=mixed
TimeoutStopSec=5
Restart=always
RestartSec=60
[Install]
WantedBy=tinc.service

View file

@ -1,6 +1,7 @@
## Process this file with automake to get Makefile.in ## Process this file with automake to get Makefile.in
info_TEXINFOS = tinc.texi info_TEXINFOS = tinc.texi
tinc_TEXINFOS = tincinclude.texi
man_MANS = tincd.8 tinc.conf.5 man_MANS = tincd.8 tinc.conf.5
@ -25,12 +26,10 @@ substitute = sed \
-e s,'@localstatedir\@',"$(localstatedir)",g -e s,'@localstatedir\@',"$(localstatedir)",g
tincd.8: $(srcdir)/tincd.8.in tincd.8: $(srcdir)/tincd.8.in
$(AM_V_GEN)$(substitute) $< > $@ $(AM_V_GEN)$(substitute) $(srcdir)/tincd.8.in > $@
tinc.conf.5: $(srcdir)/tinc.conf.5.in tinc.conf.5: $(srcdir)/tinc.conf.5.in
$(AM_V_GEN)$(substitute) $< > $@ $(AM_V_GEN)$(substitute) $(srcdir)/tinc.conf.5.in > $@
tincinclude.texi: $(srcdir)/tincinclude.texi.in tincinclude.texi: $(srcdir)/tincinclude.texi.in
$(AM_V_GEN)$(substitute) $< > $@ $(AM_V_GEN)$(substitute) $(srcdir)/tincinclude.texi.in > $@
tinc.texi: tincinclude.texi

View file

@ -146,7 +146,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
am__v_texidevnull_0 = > /dev/null am__v_texidevnull_0 = > /dev/null
am__v_texidevnull_1 = am__v_texidevnull_1 =
INFO_DEPS = tinc.info INFO_DEPS = $(srcdir)/tinc.info
am__TEXINFO_TEX_DIR = $(srcdir) am__TEXINFO_TEX_DIR = $(srcdir)
DVIS = tinc.dvi DVIS = tinc.dvi
PDFS = tinc.pdf PDFS = tinc.pdf
@ -197,7 +197,7 @@ man8dir = $(mandir)/man8
NROFF = nroff NROFF = nroff
MANS = $(man_MANS) MANS = $(man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in texinfo.tex am__DIST_COMMON = $(srcdir)/Makefile.in $(tinc_TEXINFOS) texinfo.tex
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
@ -240,9 +240,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
@ -294,12 +291,13 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
systemdsystemunitdir = @systemdsystemunitdir@ systemd_path = @systemd_path@
target_alias = @target_alias@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
info_TEXINFOS = tinc.texi info_TEXINFOS = tinc.texi
tinc_TEXINFOS = tincinclude.texi
man_MANS = tincd.8 tinc.conf.5 man_MANS = tincd.8 tinc.conf.5
EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.conf.5.in sample-config EXTRA_DIST = tincinclude.texi.in tincd.8.in tinc.conf.5.in sample-config
CLEANFILES = *.html tincd.8 tinc.conf.5 tincinclude.texi CLEANFILES = *.html tincd.8 tinc.conf.5 tincinclude.texi
@ -313,7 +311,7 @@ substitute = sed \
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .dvi .ps .SUFFIXES: .dvi .html .info .pdf .ps .texi
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \ @for dep in $?; do \
case '$(am__configure_deps)' in \ case '$(am__configure_deps)' in \
@ -344,45 +342,53 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
tinc.info: tinc.texi .texi.info:
$(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \ rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
done; \ done; \
else :; fi && \ else :; fi && \
cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $@ `test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi; \ -o $@ $<; \
then \ then \
rc=0; \ rc=0; \
$(am__cd) $(srcdir); \
else \ else \
rc=$$?; \ rc=$$?; \
$(am__cd) $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \ fi; \
rm -rf $$backupdir; exit $$rc rm -rf $$backupdir; exit $$rc
tinc.dvi: tinc.texi .texi.dvi:
$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
`test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi $<
tinc.pdf: tinc.texi .texi.pdf:
$(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
`test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi $<
tinc.html: tinc.texi .texi.html:
$(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
$(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $(@:.html=.htp) `test -f 'tinc.texi' || echo '$(srcdir)/'`tinc.texi; \ -o $(@:.html=.htp) $<; \
then \ then \
rm -rf $@ && mv $(@:.html=.htp) $@; \ rm -rf $@ && mv $(@:.html=.htp) $@; \
else \ else \
rm -rf $(@:.html=.htp); exit 1; \ rm -rf $(@:.html=.htp); exit 1; \
fi fi
$(srcdir)/tinc.info: tinc.texi $(tinc_TEXINFOS)
tinc.dvi: tinc.texi $(tinc_TEXINFOS)
tinc.pdf: tinc.texi $(tinc_TEXINFOS)
tinc.html: tinc.texi $(tinc_TEXINFOS)
.dvi.ps: .dvi.ps:
$(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) $(AM_V_texinfo) -o $@ $< $(DVIPS) $(AM_V_texinfo) -o $@ $<
@ -831,15 +837,13 @@ tinc.conf.5.html: tinc.conf.5
$(AM_V_GEN)w3mman2html $< > $@ $(AM_V_GEN)w3mman2html $< > $@
tincd.8: $(srcdir)/tincd.8.in tincd.8: $(srcdir)/tincd.8.in
$(AM_V_GEN)$(substitute) $< > $@ $(AM_V_GEN)$(substitute) $(srcdir)/tincd.8.in > $@
tinc.conf.5: $(srcdir)/tinc.conf.5.in tinc.conf.5: $(srcdir)/tinc.conf.5.in
$(AM_V_GEN)$(substitute) $< > $@ $(AM_V_GEN)$(substitute) $(srcdir)/tinc.conf.5.in > $@
tincinclude.texi: $(srcdir)/tincinclude.texi.in tincinclude.texi: $(srcdir)/tincinclude.texi.in
$(AM_V_GEN)$(substitute) $< > $@ $(AM_V_GEN)$(substitute) $(srcdir)/tincinclude.texi.in > $@
tinc.texi: tincinclude.texi
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -5,10 +5,10 @@ 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.33, a Virtual Private This is the info manual for tinc version 1.0.34, a Virtual Private
Network daemon. Network daemon.
Copyright (C) 1998-2017 Ivo Timmermans, Guus Sliepen Copyright (C) 1998-2018 Ivo Timmermans, Guus Sliepen
<guus@tinc-vpn.org> and Wessel Dankers <wsl@tinc-vpn.org>. <guus@tinc-vpn.org> and Wessel Dankers <wsl@tinc-vpn.org>.
Permission is granted to make and distribute verbatim copies of this Permission is granted to make and distribute verbatim copies of this
@ -791,13 +791,13 @@ DeviceType = <TYPE> (platform dependent)
uml (not compiled in by default) uml (not compiled in by default)
Create a UNIX socket with the filename specified by DEVICE, or Create a UNIX socket with the filename specified by DEVICE, or
'/run/NETNAME.umlsocket' if not specified. Tinc will wait for '/var/run/NETNAME.umlsocket' if not specified. Tinc will wait
a User Mode Linux instance to connect to this socket. for a User Mode Linux instance to connect to this socket.
vde (not compiled in by default) vde (not compiled in by default)
Uses the libvdeplug library to connect to a Virtual Uses the libvdeplug library to connect to a Virtual
Distributed Ethernet switch, using the UNIX socket specified Distributed Ethernet switch, using the UNIX socket specified
by DEVICE, or '/run/vde.ctl' if not specified. by DEVICE, or '/var/run/vde.ctl' if not specified.
Also, in case tinc does not seem to correctly interpret packets Also, in case tinc does not seem to correctly interpret packets
received from the virtual network device, it can be used to change received from the virtual network device, it can be used to change
@ -1597,7 +1597,7 @@ command line options.
'/var/log/tinc.NETNAME.log'. '/var/log/tinc.NETNAME.log'.
'--pidfile=FILE' '--pidfile=FILE'
Write PID to FILE instead of '/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.
@ -2291,6 +2291,7 @@ File: tinc.info, Node: Platform specific information, Next: About us, Prev: T
* Interface configuration:: * Interface configuration::
* Routes:: * Routes::
* Automatically starting tinc::
 
File: tinc.info, Node: Interface configuration, Next: Routes, Up: Platform specific information File: tinc.info, Node: Interface configuration, Next: Routes, Up: Platform specific information
@ -2343,7 +2344,7 @@ root privileges at all.
Linux 'ip tuntap add dev' INTERFACE 'mode' TUN|TAP 'user' USERNAME Linux 'ip tuntap add dev' INTERFACE 'mode' TUN|TAP 'user' USERNAME
 
File: tinc.info, Node: Routes, Prev: Interface configuration, Up: Platform specific information File: tinc.info, Node: Routes, Next: Automatically starting tinc, Prev: Interface configuration, Up: Platform specific information
7.2 Routes 7.2 Routes
========== ==========
@ -2378,6 +2379,72 @@ Solaris 'route add -inet6' NETWORK_ADDRESS'/'PREFIXLENGTH LOCAL_ADDR
Darwin (Mac OS X) 'route add -inet6' NETWORK_ADDRESS'/'PREFIXLENGTH '-interface' INTERFACE Darwin (Mac OS X) 'route add -inet6' NETWORK_ADDRESS'/'PREFIXLENGTH '-interface' INTERFACE
Windows 'netsh interface ipv6 add route' NETWORK ADDRESS/PREFIXLENGTH INTERFACE Windows 'netsh interface ipv6 add route' NETWORK ADDRESS/PREFIXLENGTH INTERFACE

File: tinc.info, Node: Automatically starting tinc, Prev: Routes, Up: Platform specific information
7.3 Automatically starting tinc
===============================
* Menu:
* Linux::
* Windows::
* Other platforms::

File: tinc.info, Node: Linux, Next: Windows, Up: Automatically starting tinc
7.3.1 Linux
-----------
There are many Linux distributions, and historically, many of them had
their own way of starting programs at boot time. Today, a number of
major Linux distributions have chosen to use systemd as their init
system. Tinc ships with systemd service files that allow you to start
and stop tinc using systemd. There are two service files:
'tinc.service' is used to globally enable or disable all tinc daemons
managed by systemd, and 'tinc@NETNAME.service' is used to enable or
disable specific tinc daemons. So if one has created a tinc network
with netname 'foo', then you have to run the following two commands to
ensure it is started at boot time:
systemctl enable tinc
systemctl enable tinc@foo
To start the tinc daemon immediately if it wasn't already running,
use the following command:
systemctl start tinc@foo
You can also use 'systemctl start tinc', this will start all tinc
daemons that are enabled. You can stop and disable tinc networks in the
same way.
If your system is not using systemd, then you have to look up your
distribution's way of starting tinc at boot time.

File: tinc.info, Node: Windows, Next: Other platforms, Prev: Linux, Up: Automatically starting tinc
7.3.2 Windows
-------------
On Windows, if tinc is started without the '-D' or '--no-detach' option,
it will automatically register itself as a service that is started at
boot time. When tinc is stopped using the '-k' or '--kill', it will
also automatically unregister itself. Once tinc is registered as a
service, it is also possible to stop and start tinc using the Windows
Services Manager.

File: tinc.info, Node: Other platforms, Prev: Windows, Up: Automatically starting tinc
7.3.3 Other platforms
---------------------
On platforms other than the ones mentioned in the earlier sections, you
have to look up your platform's way of starting programs at boot time.
 
File: tinc.info, Node: About us, Next: Concept Index, Prev: Platform specific information, Up: Top File: tinc.info, Node: About us, Next: Concept Index, Prev: Platform specific information, Up: Top
@ -2610,6 +2677,7 @@ Concept Index
* SVPN: Security. (line 11) * SVPN: Security. (line 11)
* switch: Main configuration variables. * switch: Main configuration variables.
(line 243) (line 243)
* systemd: Linux. (line 6)
* TCP: The meta-connection. (line 10) * TCP: The meta-connection. (line 10)
* TCPonly: Host configuration variables. * TCPonly: Host configuration variables.
(line 105) (line 105)
@ -2686,34 +2754,38 @@ Node: Multiple networks21794
Node: How connections work23220 Node: How connections work23220
Node: Configuration files24442 Node: Configuration files24442
Node: Main configuration variables25936 Node: Main configuration variables25936
Node: Host configuration variables42184 Node: Host configuration variables42192
Node: Scripts47716 Node: Scripts47724
Node: How to configure50982 Node: How to configure50990
Node: Generating keypairs52240 Node: Generating keypairs52248
Node: Network interfaces52739 Node: Network interfaces52747
Node: Example configuration54587 Node: Example configuration54595
Node: Running tinc59912 Node: Running tinc59920
Node: Runtime options60502 Node: Runtime options60510
Node: Signals64127 Node: Signals64139
Node: Debug levels65318 Node: Debug levels65330
Node: Solving problems66254 Node: Solving problems66266
Node: Error messages67806 Node: Error messages67818
Node: Sending bug reports71815 Node: Sending bug reports71827
Node: Technical information72762 Node: Technical information72774
Node: The connection72993 Node: The connection73005
Node: The UDP tunnel73305 Node: The UDP tunnel73317
Node: The meta-connection76366 Node: The meta-connection76378
Node: The meta-protocol77835 Node: The meta-protocol77847
Node: Security82852 Node: Security82864
Node: Authentication protocol83994 Node: Authentication protocol84006
Node: Encryption of network packets89039 Node: Encryption of network packets89051
Node: Security issues90415 Node: Security issues90427
Node: Platform specific information92054 Node: Platform specific information92066
Node: Interface configuration92282 Node: Interface configuration92326
Node: Routes94753 Node: Routes94797
Node: About us96767 Node: Automatically starting tinc96847
Node: Contact information96942 Node: Linux97070
Node: Authors97345 Node: Windows98291
Node: Concept Index97750 Node: Other platforms98796
Node: About us99078
Node: Contact information99253
Node: Authors99656
Node: Concept Index100061
 
End Tag Table End Tag Table

View file

@ -15,7 +15,7 @@
This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon. This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon.
Copyright @copyright{} 1998-2017 Ivo Timmermans, Copyright @copyright{} 1998-2018 Ivo Timmermans,
Guus Sliepen <guus@@tinc-vpn.org> and Guus Sliepen <guus@@tinc-vpn.org> and
Wessel Dankers <wsl@@tinc-vpn.org>. Wessel Dankers <wsl@@tinc-vpn.org>.
@ -39,7 +39,7 @@ permission notice identical to this one.
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon. This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon.
Copyright @copyright{} 1998-2017 Ivo Timmermans, Copyright @copyright{} 1998-2018 Ivo Timmermans,
Guus Sliepen <guus@@tinc-vpn.org> and Guus Sliepen <guus@@tinc-vpn.org> and
Wessel Dankers <wsl@@tinc-vpn.org>. Wessel Dankers <wsl@@tinc-vpn.org>.
@ -2443,6 +2443,7 @@ tinc or give us feedback, you are stronly encouraged to do so.
@menu @menu
* Interface configuration:: * Interface configuration::
* Routes:: * Routes::
* Automatically starting tinc::
@end menu @end menu
@c ================================================================== @c ==================================================================
@ -2569,6 +2570,66 @@ Adding routes to IPv6 subnets:
@tab @code{netsh interface ipv6 add route} @var{network address}/@var{prefixlength} @var{interface} @tab @code{netsh interface ipv6 add route} @var{network address}/@var{prefixlength} @var{interface}
@end multitable @end multitable
@c ==================================================================
@node Automatically starting tinc
@section Automatically starting tinc
@menu
* Linux::
* Windows::
* Other platforms::
@end menu
@c ==================================================================
@node Linux
@subsection Linux
@cindex systemd
There are many Linux distributions, and historically, many of them had their
own way of starting programs at boot time. Today, a number of major Linux
distributions have chosen to use systemd as their init system. Tinc ships with
systemd service files that allow you to start and stop tinc using systemd.
There are two service files: @code{tinc.service} is used to globally enable or
disable all tinc daemons managed by systemd, and
@code{tinc@@@var{netname}.service} is used to enable or disable specific tinc
daemons. So if one has created a tinc network with netname @code{foo}, then
you have to run the following two commands to ensure it is started at boot
time:
@example
systemctl enable tinc
systemctl enable tinc@@foo
@end example
To start the tinc daemon immediately if it wasn't already running, use the
following command:
@example
systemctl start tinc@@foo
@end example
You can also use @samp{systemctl start tinc}, this will start all tinc daemons
that are enabled. You can stop and disable tinc networks in the same way.
If your system is not using systemd, then you have to look up your
distribution's way of starting tinc at boot time.
@c ==================================================================
@node Windows
@subsection Windows
On Windows, if tinc is started without the @code{-D} or @code{--no-detach}
option, it will automatically register itself as a service that is started at
boot time. When tinc is stopped using the @code{-k} or @code{--kill}, it will
also automatically unregister itself. Once tinc is registered as a service, it
is also possible to stop and start tinc using the Windows Services Manager.
@c ==================================================================
@node Other platforms
@subsection Other platforms
On platforms other than the ones mentioned in the earlier sections, you have to
look up your platform's way of starting programs at boot time.
@c ================================================================== @c ==================================================================
@node About us @node About us

5
doc/tincinclude.texi Normal file
View file

@ -0,0 +1,5 @@
@set VERSION 1.0.34
@set PACKAGE tinc
@set sysconfdir /etc
@set localstatedir /var
@set runstatedir /var/run

View file

@ -261,9 +261,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
@ -315,7 +312,7 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
systemdsystemunitdir = @systemdsystemunitdir@ systemd_path = @systemd_path@
target_alias = @target_alias@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@

View file

@ -56,7 +56,7 @@ void expire_events(void) {
time_t diff; time_t diff;
/* /*
* Make all events appear expired by substracting the difference between * Make all events appear expired by subtracting the difference between
* the expiration time of the last event and the current time. * the expiration time of the last event and the current time.
*/ */

View file

@ -34,7 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "../config.h" #include "../config.h"
#endif #endif
#if !defined (STDC) || !STDC #if !defined (__STDC__) || !__STDC__
/* This is a separate conditional since some stdc systems /* This is a separate conditional since some stdc systems
reject `defined (const)'. */ reject `defined (const)'. */
#ifndef const #ifndef const
@ -57,7 +57,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
it is simpler to just do this in the source for each such file. */ it is simpler to just do this in the source for each such file. */
#define GETOPT_INTERFACE_VERSION 2 #define GETOPT_INTERFACE_VERSION 2
#if !defined (_LIBC) && defined (GLIBC) && GLIBC >= 2 #if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
#include <gnu-versions.h> #include <gnu-versions.h>
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
#define ELIDE_CODE #define ELIDE_CODE
@ -68,8 +68,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* This needs to come after some library #include /* This needs to come after some library #include
to get GNU_LIBRARY defined. */ to get __GNU_LIBRARY__ defined. */
#ifdef GNU_LIBRARY #ifdef __GNU_LIBRARY__
/* Don't include stdlib.h for non-GNU C libraries because some of them /* Don't include stdlib.h for non-GNU C libraries because some of them
contain conflicting prototypes for getopt. */ contain conflicting prototypes for getopt. */
#include <stdlib.h> #include <stdlib.h>
@ -83,7 +83,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#endif #endif
#endif #endif
#if defined (WIN32) && !defined (CYGWIN32) #if defined (WIN32) && !defined (__CYGWIN32__32)
/* It's not Unix, really. See? Capital letters. */ /* It's not Unix, really. See? Capital letters. */
#include <windows.h> #include <windows.h>
#define getpid() GetCurrentProcessId() #define getpid() GetCurrentProcessId()
@ -190,7 +190,7 @@ static enum {
/* Value of POSIXLY_CORRECT environment variable. */ /* Value of POSIXLY_CORRECT environment variable. */
static char *posixly_correct; static char *posixly_correct;
#ifdef GNU_LIBRARY #ifdef __GNU_LIBRARY__
/* We want to avoid inclusion of string.h with non-GNU libraries /* We want to avoid inclusion of string.h with non-GNU libraries
because there are many ways it can cause trouble. because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work On some systems, it contains special magic macros that don't work
@ -222,17 +222,17 @@ int chr;
/* If using GCC, we can safely declare strlen this way. /* If using GCC, we can safely declare strlen this way.
If not using GCC, it is ok not to declare it. */ If not using GCC, it is ok not to declare it. */
#ifdef GNUC #ifdef __GNUC__
/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
That was relevant to code that was here before. */ That was relevant to code that was here before. */
#if !defined (STDC) || !STDC #if !defined (__STDC__) || !__STDC__
/* gcc with -traditional declares the built-in strlen to return int, /* gcc with -traditional declares the built-in strlen to return int,
and has done so at least since version 2.4.5. -- rms. */ and has done so at least since version 2.4.5. -- rms. */
extern int strlen(const char *); extern int strlen(const char *);
#endif /* not STDC */ #endif /* not __STDC__ */
#endif /* GNUC */ #endif /* __GNUC__ */
#endif /* not GNU_LIBRARY */ #endif /* not __GNU_LIBRARY__ */
/* Handle permutation of arguments. */ /* Handle permutation of arguments. */
@ -291,7 +291,7 @@ text_set_element(libc_subinit, store_args_and_env);
`first_nonopt' and `last_nonopt' are relocated so that they describe `first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */ the new indices of the non-options in ARGV after they are moved. */
#if defined (STDC) && STDC #if defined (__STDC__) && __STDC__
static void exchange(char **); static void exchange(char **);
#endif #endif
@ -374,7 +374,7 @@ char **argv;
/* Initialize the internal data when the first call is made. */ /* Initialize the internal data when the first call is made. */
#if defined (STDC) && STDC #if defined (__STDC__) && __STDC__
static const char *_getopt_initialize(int, char *const *, const char *); static const char *_getopt_initialize(int, char *const *, const char *);
#endif #endif
static const char * static const char *

View file

@ -79,7 +79,7 @@ extern "C" {
returns the contents of the `val' field. */ returns the contents of the `val' field. */
struct option { struct option {
#if defined (STDC) && STDC #if defined (__STDC__) && __STDC__
const char *name; const char *name;
#else #else
char *name; char *name;
@ -97,15 +97,15 @@ extern "C" {
#define required_argument 1 #define required_argument 1
#define optional_argument 2 #define optional_argument 2
#if defined (STDC) && STDC #if defined (__STDC__) && __STDC__
#ifdef GNU_LIBRARY #ifdef __GNU_LIBRARY__
/* Many other libraries have conflicting prototypes for getopt, with /* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */ errors, only prototype getopt for the GNU C library. */
extern int getopt(int argc, char *const *argv, const char *shortopts); extern int getopt(int argc, char *const *argv, const char *shortopts);
#else /* not GNU_LIBRARY */ #else /* not __GNU_LIBRARY__ */
extern int getopt(); extern int getopt();
#endif /* GNU_LIBRARY */ #endif /* __GNU_LIBRARY__ */
extern int getopt_long(int argc, char *const *argv, const char *shortopts, extern int getopt_long(int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind); const struct option *longopts, int *longind);
extern int getopt_long_only(int argc, char *const *argv, extern int getopt_long_only(int argc, char *const *argv,
@ -117,13 +117,13 @@ extern "C" {
const char *shortopts, const char *shortopts,
const struct option *longopts, int *longind, const struct option *longopts, int *longind,
int long_only); int long_only);
#else /* not STDC */ #else /* not __STDC__ */
extern int getopt(); extern int getopt();
extern int getopt_long(); extern int getopt_long();
extern int getopt_long_only(); extern int getopt_long_only();
extern int _getopt_internal(); extern int _getopt_internal();
#endif /* STDC */ #endif /* __STDC__ */
#ifdef cplusplus #ifdef cplusplus
} }

View file

@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "getopt.h" #include "getopt.h"
#if !defined (STDC) || !STDC #if !defined (__STDC__) || !__STDC__
/* This is a separate conditional since some stdc systems /* This is a separate conditional since some stdc systems
reject `defined (const)'. */ reject `defined (const)'. */
#ifndef const #ifndef const
@ -44,7 +44,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
it is simpler to just do this in the source for each such file. */ it is simpler to just do this in the source for each such file. */
#define GETOPT_INTERFACE_VERSION 2 #define GETOPT_INTERFACE_VERSION 2
#if !defined (_LIBC) && defined (GLIBC) && GLIBC >= 2 #if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
#include <gnu-versions.h> #include <gnu-versions.h>
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
#define ELIDE_CODE #define ELIDE_CODE
@ -55,8 +55,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* This needs to come after some library #include /* This needs to come after some library #include
to get GNU_LIBRARY defined. */ to get __GNU_LIBRARY__ defined. */
#ifdef GNU_LIBRARY #ifdef __GNU_LIBRARY__
#include <stdlib.h> #include <stdlib.h>
#endif #endif

View file

@ -63,7 +63,7 @@
#ifndef HAVE_STRUCT_IP #ifndef HAVE_STRUCT_IP
struct ip { struct ip {
#if BYTE_ORDER == LITTLE_ENDIAN #if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int ip_hl: 4; unsigned int ip_hl: 4;
unsigned int ip_v: 4; unsigned int ip_v: 4;
#else #else

View file

@ -167,6 +167,5 @@ void closelogger(void) {
case LOGMODE_NULL: case LOGMODE_NULL:
case LOGMODE_STDERR: case LOGMODE_STDERR:
break; break;
break;
} }
} }

View file

@ -218,6 +218,7 @@ void terminate_connection(connection_t *c, bool report) {
} }
edge_del(c->edge); edge_del(c->edge);
c->edge = NULL;
/* Run MST and SSSP algorithms */ /* Run MST and SSSP algorithms */

View file

@ -580,18 +580,18 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
listen_socket[n->sock].priority = origpriority; listen_socket[n->sock].priority = origpriority;
switch(listen_socket[n->sock].sa.sa.sa_family) { switch(listen_socket[n->sock].sa.sa.sa_family) {
#if defined(SOL_IP) && defined(IP_TOS) #if defined(IP_TOS)
case AF_INET: case AF_INET:
ifdebug(TRAFFIC) logger(LOG_DEBUG, "Setting IPv4 outgoing packet priority to %d", origpriority); ifdebug(TRAFFIC) logger(LOG_DEBUG, "Setting IPv4 outgoing packet priority to %d", origpriority);
if(setsockopt(listen_socket[n->sock].udp, SOL_IP, IP_TOS, (void *)&origpriority, sizeof(origpriority))) { /* SO_PRIORITY doesn't seem to work */ if(setsockopt(listen_socket[n->sock].udp, IPPROTO_IP, IP_TOS, (void *)&origpriority, sizeof(origpriority))) { /* SO_PRIORITY doesn't seem to work */
logger(LOG_ERR, "System call `%s' failed: %s", "setsockopt", strerror(errno)); logger(LOG_ERR, "System call `%s' failed: %s", "setsockopt", strerror(errno));
} }
break; break;
#endif #endif
#if defined(IPPROTO_IPV6) && defined(IPV6_TCLASS) #if defined(IPV6_TCLASS)
case AF_INET6: case AF_INET6:
ifdebug(TRAFFIC) logger(LOG_DEBUG, "Setting IPv6 outgoing packet priority to %d", origpriority); ifdebug(TRAFFIC) logger(LOG_DEBUG, "Setting IPv6 outgoing packet priority to %d", origpriority);

View file

@ -239,7 +239,7 @@ static bool read_rsa_private_key(void) {
return false; return false;
} }
#if !defined(HAVE_MINGW) && !defined(HAVE_CYGWIN) #if !defined(HAVE_MINGW) && !defined(HAVE___CYGWIN32__)
struct stat s; struct stat s;
if(!fstat(fileno(fp), &s)) { if(!fstat(fileno(fp), &s)) {
@ -860,7 +860,7 @@ static bool setup_myself(void) {
#ifdef HAVE_MINGW #ifdef HAVE_MINGW
Sleep(1000); Sleep(1000);
#endif #endif
#ifdef HAVE_CYGWIN #ifdef HAVE___CYGWIN32__
sleep(1); sleep(1);
#endif #endif
execute_script("tinc-up", envp); execute_script("tinc-up", envp);

View file

@ -77,12 +77,12 @@ static void configure_tcp(connection_t *c) {
setsockopt(c->socket, SOL_TCP, TCP_NODELAY, (void *)&option, sizeof(option)); setsockopt(c->socket, SOL_TCP, TCP_NODELAY, (void *)&option, sizeof(option));
#endif #endif
#if defined(SOL_IP) && defined(IP_TOS) && defined(IPTOS_LOWDELAY) #if defined(IP_TOS) && defined(IPTOS_LOWDELAY)
option = IPTOS_LOWDELAY; option = IPTOS_LOWDELAY;
setsockopt(c->socket, SOL_IP, IP_TOS, (void *)&option, sizeof(option)); setsockopt(c->socket, IPPROTO_IP, IP_TOS, (void *)&option, sizeof(option));
#endif #endif
#if defined(IPPROTO_IPV6) && defined(IPV6_TCLASS) && defined(IPTOS_LOWDELAY) #if defined(IPV6_TCLASS) && defined(IPTOS_LOWDELAY)
option = IPTOS_LOWDELAY; option = IPTOS_LOWDELAY;
setsockopt(c->socket, IPPROTO_IPV6, IPV6_TCLASS, (void *)&option, sizeof(option)); setsockopt(c->socket, IPPROTO_IPV6, IPV6_TCLASS, (void *)&option, sizeof(option));
#endif #endif
@ -142,12 +142,14 @@ int setup_listen_socket(const sockaddr_t *sa) {
option = 1; option = 1;
setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, (void *)&option, sizeof(option)); setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, (void *)&option, sizeof(option));
#if defined(SOL_IPV6) && defined(IPV6_V6ONLY) #if defined(IPV6_V6ONLY)
if(sa->sa.sa_family == AF_INET6) { if(sa->sa.sa_family == AF_INET6) {
setsockopt(nfd, SOL_IPV6, IPV6_V6ONLY, (void *)&option, sizeof(option)); setsockopt(nfd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&option, sizeof(option));
} }
#else
#warning IPV6_V6ONLY not defined
#endif #endif
if(get_config_string(lookup_config(config_tree, "BindToInterface"), &iface)) { if(get_config_string(lookup_config(config_tree, "BindToInterface"), &iface)) {
@ -238,7 +240,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa) {
logger(LOG_WARNING, "Can't set UDP SO_SNDBUF to %i: %s", udp_sndbuf, strerror(errno)); logger(LOG_WARNING, "Can't set UDP SO_SNDBUF to %i: %s", udp_sndbuf, strerror(errno));
} }
#if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY) #if defined(IPV6_V6ONLY)
if(sa->sa.sa_family == AF_INET6) { if(sa->sa.sa_family == AF_INET6) {
setsockopt(nfd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&option, sizeof(option)); setsockopt(nfd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&option, sizeof(option));
@ -250,14 +252,14 @@ int setup_vpn_in_socket(const sockaddr_t *sa) {
#define IP_DONTFRAGMENT IP_DONTFRAG #define IP_DONTFRAGMENT IP_DONTFRAG
#endif #endif
#if defined(SOL_IP) && defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DO) #if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DO)
if(myself->options & OPTION_PMTU_DISCOVERY) { if(myself->options & OPTION_PMTU_DISCOVERY) {
option = IP_PMTUDISC_DO; option = IP_PMTUDISC_DO;
setsockopt(nfd, SOL_IP, IP_MTU_DISCOVER, (void *)&option, sizeof(option)); setsockopt(nfd, IPPROTO_IP, IP_MTU_DISCOVER, (void *)&option, sizeof(option));
} }
#elif defined(IPPROTO_IP) && defined(IP_DONTFRAGMENT) #elif defined(IP_DONTFRAGMENT)
if(myself->options & OPTION_PMTU_DISCOVERY) { if(myself->options & OPTION_PMTU_DISCOVERY) {
option = 1; option = 1;
@ -266,14 +268,14 @@ int setup_vpn_in_socket(const sockaddr_t *sa) {
#endif #endif
#if defined(SOL_IPV6) && defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DO) #if defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DO)
if(myself->options & OPTION_PMTU_DISCOVERY) { if(myself->options & OPTION_PMTU_DISCOVERY) {
option = IPV6_PMTUDISC_DO; option = IPV6_PMTUDISC_DO;
setsockopt(nfd, SOL_IPV6, IPV6_MTU_DISCOVER, (void *)&option, sizeof(option)); setsockopt(nfd, IPPROTO_IPV6, IPV6_MTU_DISCOVER, (void *)&option, sizeof(option));
} }
#elif defined(IPPROTO_IPV6) && defined(IPV6_DONTFRAG) #elif defined(IPV6_DONTFRAG)
if(myself->options & OPTION_PMTU_DISCOVERY) { if(myself->options & OPTION_PMTU_DISCOVERY) {
option = 1; option = 1;
@ -509,11 +511,11 @@ connect:
#endif #endif
if(proxytype != PROXY_EXEC) { if(proxytype != PROXY_EXEC) {
#if defined(SOL_IPV6) && defined(IPV6_V6ONLY) #if defined(IPV6_V6ONLY)
int option = 1; int option = 1;
if(c->address.sa.sa_family == AF_INET6) { if(c->address.sa.sa_family == AF_INET6) {
setsockopt(c->socket, SOL_IPV6, IPV6_V6ONLY, (void *)&option, sizeof(option)); setsockopt(c->socket, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&option, sizeof(option));
} }
#endif #endif

View file

@ -49,7 +49,7 @@ bool send_pong(connection_t *c) {
bool pong_h(connection_t *c) { bool pong_h(connection_t *c) {
c->status.pinged = false; c->status.pinged = false;
/* Succesful connection, reset timeout if this is an outgoing connection. */ /* Successful connection, reset timeout if this is an outgoing connection. */
if(c->outgoing) { if(c->outgoing) {
c->outgoing->timeout = 0; c->outgoing->timeout = 0;

View file

@ -1,7 +1,7 @@
/* /*
tincd.c -- the main file for tincd tincd.c -- the main file for tincd
Copyright (C) 1998-2005 Ivo Timmermans Copyright (C) 1998-2005 Ivo Timmermans
2000-2017 Guus Sliepen <guus@tinc-vpn.org> 2000-2018 Guus Sliepen <guus@tinc-vpn.org>
2008 Max Rijevski <maksuf@gmail.com> 2008 Max Rijevski <maksuf@gmail.com>
2009 Michael Tokarev <mjt@tls.msk.ru> 2009 Michael Tokarev <mjt@tls.msk.ru>
2010 Julien Muchembled <jm@jmuchemb.eu> 2010 Julien Muchembled <jm@jmuchemb.eu>
@ -662,7 +662,7 @@ int main(int argc, char **argv) {
if(show_version) { if(show_version) {
printf("%s version %s\n", PACKAGE, VERSION); printf("%s version %s\n", PACKAGE, VERSION);
printf("Copyright (C) 1998-2017 Ivo Timmermans, Guus Sliepen and others.\n" printf("Copyright (C) 1998-2018 Ivo Timmermans, Guus Sliepen and others.\n"
"See the AUTHORS file for a complete list.\n\n" "See the AUTHORS file for a complete list.\n\n"
"tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
"and you are welcome to redistribute it under certain conditions;\n" "and you are welcome to redistribute it under certain conditions;\n"

View file

@ -54,8 +54,8 @@ void bin2hex(char *src, char *dst, int length) {
} }
} }
#if defined(HAVE_MINGW) || defined(HAVE_CYGWIN) #if defined(HAVE_MINGW) || defined(HAVE___CYGWIN32__)
#ifdef HAVE_CYGWIN #ifdef HAVE___CYGWIN32__
#include <w32api/windows.h> #include <w32api/windows.h>
#endif #endif

18
systemd/Makefile.am Normal file
View file

@ -0,0 +1,18 @@
EXTRA_DIST = tinc.service.in tinc@.service.in
CLEANFILES = tinc.service tinc@.service
if WITH_SYSTEMD
systemddir = @systemd_path@
nodist_systemd_DATA = tinc.service tinc@.service
endif
substitute = sed \
-e s,'@sbindir\@',"$(sbindir)",g \
-e s,'@sysconfdir\@',"$(sysconfdir)",g
tinc.service: $(srcdir)/tinc.service.in
$(AM_V_GEN)$(substitute) $(srcdir)/tinc.service.in > $@
tinc@.service: $(srcdir)/tinc@.service.in
$(AM_V_GEN)$(substitute) $(srcdir)/tinc@.service.in > $@

View file

@ -88,7 +88,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = distro subdir = systemd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/attribute.m4 \
$(top_srcdir)/m4/ax_append_flag.m4 \ $(top_srcdir)/m4/ax_append_flag.m4 \
@ -151,8 +151,8 @@ am__uninstall_files_from_dir = { \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \ $(am__cd) "$$dir" && rm -f $$files; }; \
} }
am__installdirs = "$(DESTDIR)$(systemdsystemunitdir)" am__installdirs = "$(DESTDIR)$(systemddir)"
DATA = $(systemdsystemunit_DATA) DATA = $(nodist_systemd_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -197,9 +197,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
@ -251,18 +248,18 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
systemdsystemunitdir = @systemdsystemunitdir@ systemd_path = @systemd_path@
target_alias = @target_alias@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
EXTRA_DIST = \ EXTRA_DIST = tinc.service.in tinc@.service.in
tinc.service \ CLEANFILES = tinc.service tinc@.service
tinc@.service @WITH_SYSTEMD_TRUE@systemddir = @systemd_path@
@WITH_SYSTEMD_TRUE@nodist_systemd_DATA = tinc.service tinc@.service
@HAVE_SYSTEMD_TRUE@systemdsystemunit_DATA = \ substitute = sed \
@HAVE_SYSTEMD_TRUE@ tinc.service \ -e s,'@sbindir\@',"$(sbindir)",g \
@HAVE_SYSTEMD_TRUE@ tinc@.service -e s,'@sysconfdir\@',"$(sysconfdir)",g
all: all-am all: all-am
@ -276,9 +273,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu distro/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu systemd/Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu distro/Makefile $(AUTOMAKE) --gnu systemd/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
@ -296,27 +293,27 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
install-systemdsystemunitDATA: $(systemdsystemunit_DATA) install-nodist_systemdDATA: $(nodist_systemd_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
@list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ @list='$(nodist_systemd_DATA)'; test -n "$(systemddir)" || list=; \
if test -n "$$list"; then \ if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(systemdsystemunitdir)'"; \ echo " $(MKDIR_P) '$(DESTDIR)$(systemddir)'"; \
$(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)" || exit 1; \ $(MKDIR_P) "$(DESTDIR)$(systemddir)" || exit 1; \
fi; \ fi; \
for p in $$list; do \ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \ echo "$$d$$p"; \
done | $(am__base_list) | \ done | $(am__base_list) | \
while read files; do \ while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemdsystemunitdir)'"; \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemddir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(systemdsystemunitdir)" || exit $$?; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemddir)" || exit $$?; \
done done
uninstall-systemdsystemunitDATA: uninstall-nodist_systemdDATA:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ @list='$(nodist_systemd_DATA)'; test -n "$(systemddir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir) dir='$(DESTDIR)$(systemddir)'; $(am__uninstall_files_from_dir)
tags TAGS: tags TAGS:
ctags CTAGS: ctags CTAGS:
@ -358,7 +355,7 @@ check-am: all-am
check: check-am check: check-am
all-am: Makefile $(DATA) all-am: Makefile $(DATA)
installdirs: installdirs:
for dir in "$(DESTDIR)$(systemdsystemunitdir)"; do \ for dir in "$(DESTDIR)$(systemddir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
@ -383,6 +380,7 @@ install-strip:
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@ -411,7 +409,7 @@ info: info-am
info-am: info-am:
install-data-am: install-systemdsystemunitDATA install-data-am: install-nodist_systemdDATA
install-dvi: install-dvi-am install-dvi: install-dvi-am
@ -455,7 +453,7 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-systemdsystemunitDATA uninstall-am: uninstall-nodist_systemdDATA
.MAKE: install-am install-strip .MAKE: install-am install-strip
@ -464,16 +462,22 @@ uninstall-am: uninstall-systemdsystemunitDATA
html-am info info-am install install-am install-data \ html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \ install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \ install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \ install-info-am install-man install-nodist_systemdDATA \
install-ps install-ps-am install-strip \ install-pdf install-pdf-am install-ps install-ps-am \
install-systemdsystemunitDATA installcheck installcheck-am \ install-strip installcheck installcheck-am installdirs \
installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall uninstall-am uninstall-systemdsystemunitDATA uninstall-am uninstall-nodist_systemdDATA
.PRECIOUS: Makefile .PRECIOUS: Makefile
tinc.service: $(srcdir)/tinc.service.in
$(AM_V_GEN)$(substitute) $(srcdir)/tinc.service.in > $@
tinc@.service: $(srcdir)/tinc@.service.in
$(AM_V_GEN)$(substitute) $(srcdir)/tinc@.service.in > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:

View file

@ -3,14 +3,18 @@
[Unit] [Unit]
Description=Tinc VPN Description=Tinc VPN
Documentation=info:tinc
Documentation=man:tinc(8) man:tinc.conf(5)
Documentation=http://tinc-vpn.org/docs/
After=network.target After=network.target
Wants=network.target
[Service] [Service]
Type=oneshot Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes
ExecStart=/bin/true ExecStart=/bin/true
ExecReload=/bin/true ExecReload=/bin/true
WorkingDirectory=/etc/tinc WorkingDirectory=@sysconfdir@/tinc
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

20
systemd/tinc@.service.in Normal file
View file

@ -0,0 +1,20 @@
[Unit]
Description=Tinc net %i
Documentation=info:tinc
Documentation=man:tinc(8) man:tinc.conf(5)
Documentation=http://tinc-vpn.org/docs/
PartOf=tinc.service
ReloadPropagatedFrom=tinc.service
[Service]
Type=simple
WorkingDirectory=@sysconfdir@/tinc/%i
ExecStart=@sbindir@/tincd -n %i -D
ExecReload=@sbindir@/tincd -n %i -kHUP
KillMode=mixed
Restart=on-failure
RestartSec=5
TimeoutStopSec=5
[Install]
WantedBy=tinc.service