diff --git a/waku/node.go b/waku/node.go index 70965a497..759a063dc 100644 --- a/waku/node.go +++ b/waku/node.go @@ -116,10 +116,6 @@ func Execute(options Options) { nodeOpts = append(nodeOpts, node.WithAdvertiseAddresses(options.AdvertiseAddresses...)) } - if options.Dns4DomainName != "" { - nodeOpts = append(nodeOpts, node.WithDns4Domain(options.Dns4DomainName)) - } - if options.ExtIP != "" { ip := net.ParseIP(options.ExtIP) if ip == nil { @@ -128,6 +124,10 @@ func Execute(options Options) { nodeOpts = append(nodeOpts, node.WithExternalIP(ip)) } + if options.Dns4DomainName != "" { + nodeOpts = append(nodeOpts, node.WithDns4Domain(options.Dns4DomainName)) + } + libp2pOpts := node.DefaultLibP2POptions if len(options.AdvertiseAddresses) == 0 { libp2pOpts = append(libp2pOpts, libp2p.NATPortMap()) // Attempt to open ports using uPNP for NATed hosts.)