Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Records are not updated in the daemon mode when optional parameters are changed #107

Open
Zebradil opened this issue Mar 31, 2024 · 0 comments

Comments

@Zebradil
Copy link
Owner

In the daemon mode, CDD uses the state file to decide where to continue with processing or not. It exits earlier when the IP in the state file matches the currently selected IP. Apart from the IP, the state file name can change. It is composed of: the interface name, the IP stack (ipv4 or ipv6) and the hash from the domain names.

h := fnv.New64a()
domainHash := h.Sum([]byte(strings.Join(domains, " ")))
stateFilepath = fmt.Sprintf("%s_%s_%x", iface, stack, domainHash)

According to this logic, changes to other configuration values like proxy or ttl do not trigger re-processing. The workaround is to delete the state file.

This can be solved by including more information in state files. A state file can be named after the configuration file used to run CDD and can contain a bigger subset of the configuration serialized (instead of only IP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant