summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorNadrieril <nadrieril@gmail.com>2017-07-14 11:47:15 +0100
committerRobin Gloster <mail@glob.in>2017-07-17 13:07:49 +0200
commit8669fb1f96cfd68ed68d9d76ff1f0237d4d96748 (patch)
tree5d91fbfb9273d48cc36f39621ac9e084761428b5 /nixos
parentd2aa638ee2b6f9771cf63f90dbc04a3eb3ecc384 (diff)
downloadnixlib-8669fb1f96cfd68ed68d9d76ff1f0237d4d96748.tar
nixlib-8669fb1f96cfd68ed68d9d76ff1f0237d4d96748.tar.gz
nixlib-8669fb1f96cfd68ed68d9d76ff1f0237d4d96748.tar.bz2
nixlib-8669fb1f96cfd68ed68d9d76ff1f0237d4d96748.tar.lz
nixlib-8669fb1f96cfd68ed68d9d76ff1f0237d4d96748.tar.xz
nixlib-8669fb1f96cfd68ed68d9d76ff1f0237d4d96748.tar.zst
nixlib-8669fb1f96cfd68ed68d9d76ff1f0237d4d96748.zip
tinc service: BindToAddress and ListenAddress are different options, they should not be mistaken
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/release-notes/rl-1709.xml10
-rw-r--r--nixos/modules/services/networking/tinc.nix13
2 files changed, 21 insertions, 2 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1709.xml b/nixos/doc/manual/release-notes/rl-1709.xml
index 3ae2d260c992..72dfd60bedd9 100644
--- a/nixos/doc/manual/release-notes/rl-1709.xml
+++ b/nixos/doc/manual/release-notes/rl-1709.xml
@@ -120,6 +120,16 @@ rmdir /var/lib/ipfs/.ipfs
       also serve as a SSH agent if <literal>enableSSHSupport</literal> is set.
     </para>
   </listitem>
+  <listitem>
+    <para>
+      The <literal>services.tinc.networks.&lt;name&gt;.listenAddress</literal>
+      option had a misleading name that did not correspond to its behavior. It
+      now correctly defines the ip to listen for incoming connections on. To
+      keep the previous behaviour, use
+      <literal>services.tinc.networks.&lt;name&gt;.bindToAddress</literal>
+      instead. Refer to the description of the options for more details.
+    </para>
+  </listitem>
 </itemizedlist>
 
 <para>Other notable improvements:</para>
diff --git a/nixos/modules/services/networking/tinc.nix b/nixos/modules/services/networking/tinc.nix
index 79a0aa953feb..7376d2d24a0b 100644
--- a/nixos/modules/services/networking/tinc.nix
+++ b/nixos/modules/services/networking/tinc.nix
@@ -79,7 +79,15 @@ in
               default = null;
               type = types.nullOr types.str;
               description = ''
-                The ip adress to bind to.
+                The ip address to listen on for incoming connections.
+              '';
+            };
+
+            bindToAddress = mkOption {
+              default = null;
+              type = types.nullOr types.str;
+              description = ''
+                The ip address to bind to (both listen on and send packets from).
               '';
             };
 
@@ -131,7 +139,8 @@ in
               Name = ${if data.name == null then "$HOST" else data.name}
               DeviceType = ${data.interfaceType}
               ${optionalString (data.ed25519PrivateKeyFile != null) "Ed25519PrivateKeyFile = ${data.ed25519PrivateKeyFile}"}
-              ${optionalString (data.listenAddress != null) "BindToAddress = ${data.listenAddress}"}
+              ${optionalString (data.listenAddress != null) "ListenAddress = ${data.listenAddress}"}
+              ${optionalString (data.bindToAddress != null) "BindToAddress = ${data.bindToAddress}"}
               Device = /dev/net/tun
               Interface = tinc.${network}
               ${data.extraConfig}