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

refresh SRV records and send out ServiceRemoved for expired SRV #180

Merged
merged 3 commits into from
May 7, 2024

Conversation

keepsimple1
Copy link
Owner

@keepsimple1 keepsimple1 commented Mar 4, 2024

This patch is to fix issue raised in #176. There are two parts:

  • Add checks of refresh for SRV record so that they will be updated if the responder is alive.
  • Also triggers ServiceRemoved when SRV record expires as the responder is no longer active.

Added a new setter _set_host_ttl() for DnsRecord to support testing.

Also addressed issue #203 : only apply cache-flush bit if the record is new, i.e. rdata changed. Otherwise, it is only a refresh of TTL. This makes sense to me as it can avoid unnecessary new ServiceResolved events.

Also removed -Wclippy::all from CI as it refers the default warnings, hence is redundant with -D warnings. (https://doc.rust-lang.org/clippy/)

@keepsimple1 keepsimple1 changed the title DRAFT: check refresh due for SRV, ADDR and TXT refresh SRV, TXT records and send out ServiceRemoved for expired SRV Mar 19, 2024
…ecords

- Added logic to handle TTL = 0 in responses.
- Only apply cache-flush bit if a new record (i.e. rdata changed).
@keepsimple1 keepsimple1 changed the title refresh SRV, TXT records and send out ServiceRemoved for expired SRV refresh SRV records and send out ServiceRemoved for expired SRV May 6, 2024
@keepsimple1
Copy link
Owner Author

Rebased to the latest main branch and update the PR description.

@keepsimple1 keepsimple1 merged commit 626f9fa into main May 7, 2024
3 checks passed
@keepsimple1 keepsimple1 deleted the srv-addr branch May 7, 2024 04:26
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

Successfully merging this pull request may close these issues.

None yet

1 participant