diff options
author | Mitchell Pleune <mitchpleune@gmail.com> | 2016-03-22 22:06:37 -0400 |
---|---|---|
committer | Mitchell Pleune <mitchpleune@gmail.com> | 2016-03-22 23:40:49 -0400 |
commit | 927aaecbcb35ec98db904e8d977b37d05e3a31d2 (patch) | |
tree | f71498ed82d8aacb9e5a093565a9c00c0d2dd6a4 /nixos/modules/services/networking | |
parent | 6f5a71dec80142adea90f88d99e60bde3f566c00 (diff) | |
download | nixlib-927aaecbcb35ec98db904e8d977b37d05e3a31d2.tar nixlib-927aaecbcb35ec98db904e8d977b37d05e3a31d2.tar.gz nixlib-927aaecbcb35ec98db904e8d977b37d05e3a31d2.tar.bz2 nixlib-927aaecbcb35ec98db904e8d977b37d05e3a31d2.tar.lz nixlib-927aaecbcb35ec98db904e8d977b37d05e3a31d2.tar.xz nixlib-927aaecbcb35ec98db904e8d977b37d05e3a31d2.tar.zst nixlib-927aaecbcb35ec98db904e8d977b37d05e3a31d2.zip |
iodined service: wantedBy ip-up.target
When iodined tries to start before any interface other than loopback has an ip, iodined fails. Wait for ip-up.target The above is because of the following: in iodined's code: src/common.c line 157 the flag AI_ADDRCONFIG is passed as a flag to getaddrinfo. Iodine uses the function get_addr(char *host, int port, int addr_family, int flags, struct sockaddr_storage *out); to get address information via getaddrinfo(). Within get_addr, the flag AI_ADDRCONFIG is forced. What this flag does, is cause getaddrinfo to return "Name or service not known" as an error explicitly if no ip has been assigned to the computer. see getaddrinfo(3) Wait for an ip before starting iodined.
Diffstat (limited to 'nixos/modules/services/networking')
-rw-r--r-- | nixos/modules/services/networking/iodined.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/iodined.nix b/nixos/modules/services/networking/iodined.nix index 6bfe62e6261c..20d371c4e2d1 100644 --- a/nixos/modules/services/networking/iodined.nix +++ b/nixos/modules/services/networking/iodined.nix @@ -64,8 +64,7 @@ in systemd.services.iodined = { description = "iodine, ip over dns daemon"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; + wantedBy = [ "ip-up.target" ]; serviceConfig.ExecStart = "${pkgs.iodine}/sbin/iodined -f -u ${iodinedUser} ${cfg.extraConfig} ${cfg.ip} ${cfg.domain}"; }; |