tinc_pre: avoid infinite loop with EBADFD on network restart
This commit is contained in:
parent
4456076bc7
commit
688dc4e4c3
@ -169,7 +169,8 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
PIDFile = "/run/tinc.${network}.pid";
|
PIDFile = "/run/tinc.${network}.pid";
|
||||||
Restart = "on-failure";
|
Restart = "always";
|
||||||
|
RestartSec = "3";
|
||||||
};
|
};
|
||||||
preStart = ''
|
preStart = ''
|
||||||
mkdir -p /etc/tinc/${network}/hosts
|
mkdir -p /etc/tinc/${network}/hosts
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchgit, autoreconfHook, texinfo, ncurses, readline, zlib, lzo, openssl }:
|
{ stdenv, fetchgit, fetchpatch, autoreconfHook, texinfo, ncurses, readline, zlib, lzo, openssl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "tinc-${version}";
|
name = "tinc-${version}";
|
||||||
@ -19,6 +19,14 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace configure.ac --replace UNKNOWN ${version}
|
substituteInPlace configure.ac --replace UNKNOWN ${version}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Avoid infinite loop with "Error while reading from Linux tun/tap device (tun mode) /dev/net/tun: File descriptor in bad state" on network restart
|
||||||
|
(fetchpatch {
|
||||||
|
url = https://github.com/gsliepen/tinc/compare/acefa66...e4544db.patch;
|
||||||
|
sha256 = "1jz7anqqzk7j96l5ifggc2knp14fmbsjdzfrbncxx0qhb6ihdcvn";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm $out/bin/tinc-gui
|
rm $out/bin/tinc-gui
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user