From: Guus Sliepen Date: Sun, 12 Apr 2015 13:42:48 +0000 (+0200) Subject: Always call res_init() before getaddrinfo(). X-Git-Tag: release-1.1pre12~185 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=95921696a49d1eff058880c90a80efd208de959d;p=tinc Always call res_init() before getaddrinfo(). Unfortunately, glibc assumes that /etc/resolv.conf is a static file that never changes. Even on servers, /etc/resolv.conf might be a dynamically generated file, and we never know when it changes. So just call res_init() every time, so glibc uses up-to-date nameserver information. Conflicts: src/have.h src/net.c src/net_setup.c --- 95921696a49d1eff058880c90a80efd208de959d diff --cc doc/tinc.conf.5.in index 56736869,9e5c0256..71b5ec6f --- a/doc/tinc.conf.5.in +++ b/doc/tinc.conf.5.in @@@ -500,14 -500,14 +500,16 @@@ The minimum amount of time between send .It Va UDPDiscoveryTimeout Li = Ar seconds Pq 30 If tinc doesn't receive any UDP ping replies over the specified interval, it will assume UDP communication is broken and will fall back to TCP. +.It Va UDPInfoInterval Li = Ar seconds Pq 5 +The minimum amount of time between sending periodic updates about UDP addresses, which are mostly useful for UDP hole punching. - .It Va UDPRcvBuf Li = Ar bytes Pq OS default + .It Va UDPRcvBuf Li = Ar bytes Pq 1048576 Sets the socket receive buffer size for the UDP socket, in bytes. - If unset, the default buffer size will be used by the operating system. - .It Va UDPSndBuf Li = Ar bytes Pq OS default + If set to zero, the default buffer size will be used by the operating system. + Note: this setting can have a significant impact on performance, especially raw throughput. + .It Va UDPSndBuf Li = Ar bytes Pq 1048576 Sets the socket send buffer size for the UDP socket, in bytes. - If unset, the default buffer size will be used by the operating system. + If set to zero, the default buffer size will be used by the operating system. + Note: this setting can have a significant impact on performance, especially raw throughput. .El .Sh HOST CONFIGURATION FILES The host configuration files contain all information needed diff --cc doc/tinc.texi index 3fe27b6a,55560f4a..05760d99 --- a/doc/tinc.texi +++ b/doc/tinc.texi @@@ -1253,19 -1253,17 +1253,21 @@@ The minimum amount of time between send If tinc doesn't receive any UDP ping replies over the specified interval, it will assume UDP communication is broken and will fall back to TCP. +@cindex UDPInfoInterval +@item UDPInfoInterval = (5) +The minimum amount of time between sending periodic updates about UDP addresses, which are mostly useful for UDP hole punching. + @cindex UDPRcvBuf - @item UDPRcvBuf = (OS default) + @item UDPRcvBuf = (1048576) Sets the socket receive buffer size for the UDP socket, in bytes. - If unset, the default buffer size will be used by the operating system. + If set to zero, the default buffer size will be used by the operating system. + Note: this setting can have a significant impact on performance, especially raw throughput. @cindex UDPSndBuf - @item UDPSndBuf = Pq OS default + @item UDPSndBuf = (1048576) Sets the socket send buffer size for the UDP socket, in bytes. - If unset, the default buffer size will be used by the operating system. + If set to zero, the default buffer size will be used by the operating system. + Note: this setting can have a significant impact on performance, especially raw throughput. @end table