mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
options: set DNS port to network default if not specified
- set port for a DNS announcement without port to network default - remove x-fail Changelog-Fixed: Port of a DNS announcement can be 0 if unspecified
This commit is contained in:
parent
6d4285d7c4
commit
65433de05f
2 changed files with 4 additions and 2 deletions
|
@ -272,7 +272,10 @@ static char *opt_add_addr_withtype(const char *arg,
|
|||
wi.u.wireaddr.addrlen = strlen(address);
|
||||
strncpy((char * restrict)&wi.u.wireaddr.addr,
|
||||
address, sizeof(wi.u.wireaddr.addr) - 1);
|
||||
wi.u.wireaddr.port = port;
|
||||
if (port == 0)
|
||||
wi.u.wireaddr.port = ld->portnum;
|
||||
else
|
||||
wi.u.wireaddr.port = port;
|
||||
|
||||
tal_arr_expand(&ld->proposed_listen_announce, ADDR_ANNOUNCE);
|
||||
tal_arr_expand(&ld->proposed_wireaddr, wi);
|
||||
|
|
|
@ -247,7 +247,6 @@ def test_only_announce_one_dns(node_factory, bitcoind):
|
|||
|
||||
|
||||
@unittest.skipIf(not EXPERIMENTAL_FEATURES, "BOLT7 DNS RFC #911")
|
||||
@pytest.mark.xfail(strict=True, raises=AssertionError)
|
||||
def test_announce_dns_without_port(node_factory, bitcoind):
|
||||
""" Checks that the port of a DNS announcement is set to the corresponding
|
||||
network port. In this case regtest 19846
|
||||
|
|
Loading…
Add table
Reference in a new issue