Skip to content

Commit

Permalink
tinc service: BindToAddress and ListenAddress are different options, …
Browse files Browse the repository at this point in the history
…they should not be mistaken
  • Loading branch information
Nadrieril authored and globin committed Jul 17, 2017
1 parent d2aa638 commit 8669fb1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 10 additions & 0 deletions nixos/doc/manual/release-notes/rl-1709.xml
Expand Up @@ -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>
Expand Down
13 changes: 11 additions & 2 deletions nixos/modules/services/networking/tinc.nix
Expand Up @@ -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).
'';
};

Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 8669fb1

Please sign in to comment.