summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-02-02 09:22:06 +0100
committerlassulus <lassulus@lassul.us>2019-02-08 05:19:48 +0100
commitcdb548ac3050c2e9f61a07e6f5eff88383e1114c (patch)
tree1dcc9801ec0e7cacfbe6f5b8cab4b83f6f69fa91
parent659cbed237ebbf158374cc85929f97eb1a6fce36 (diff)
krebs-hosts-*: don't add lines without alias
-rw-r--r--krebs/3modules/hosts.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/krebs/3modules/hosts.nix b/krebs/3modules/hosts.nix
index 3d572c04d..7fe01a769 100644
--- a/krebs/3modules/hosts.nix
+++ b/krebs/3modules/hosts.nix
@@ -42,7 +42,7 @@ in {
# hostNetAliases : host -> { ${netname} : [addrAliases] }
hostNetAliases = host:
- mapAttrs (_: net: filter (x: x.name != null) [
+ mapAttrs (_: net: filter (x: x.name != null && x.value != []) [
{ name = net.ip4.addr or null; value = net.aliases; }
{ name = net.ip6.addr or null; value = net.aliases; }
]) host.nets;