services: support 0.0.0.0/:: in address options
Previously, client services didn't decode these special INADDR_ANY addresses and failed to connect.
This commit is contained in:
parent
1848c3dd98
commit
f61e928139
13 changed files with 36 additions and 23 deletions
|
|
@ -13,6 +13,7 @@ let
|
|||
};
|
||||
|
||||
cfg = config.nix-bitcoin.nodeinfo;
|
||||
nbLib = config.nix-bitcoin.lib;
|
||||
|
||||
# Services included in the output
|
||||
services = {
|
||||
|
|
@ -96,7 +97,7 @@ let
|
|||
mkInfo = extraCode: name: cfg:
|
||||
''
|
||||
add_service("${name}", """
|
||||
info["local_address"] = "${cfg.address}:${toString cfg.port}"
|
||||
info["local_address"] = "${nbLib.addressWithPort cfg.address cfg.port}"
|
||||
'' + mkIfOnionPort name (onionPort: ''
|
||||
set_onion_address(info, "${name}", ${onionPort})
|
||||
'') + extraCode + ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue