8000 RFC 6762/10.4 Cache Flush on Failure Indication · Issue #1413 · python-zeroconf/python-zeroconf · GitHub
[go: up one dir, main page]

Skip to content

RFC 6762/10.4 Cache Flush on Failure Indication #1413

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

Open
lenard-mosys opened this issue Sep 20, 2024 · 2 comments
Open

RFC 6762/10.4 Cache Flush on Failure Indication #1413

lenard-mosys opened this issue Sep 20, 2024 · 2 comments

Comments

@lenard-mosys
Copy link

Is there a mechanism to indicate to Zeroconf/AsyncZeroconf or ServiceBrowser/AsyncServiceBrowser that a cache entry might be stale, based on application level failures on connecting to advertised services?

https://datatracker.ietf.org/doc/html/rfc6762#section-10.4

The software implementing the Multicast DNS resource record cache
should provide a mechanism so that clients detecting stale rdata can
inform the cache.

When the cache receives this hint that it should reconfirm some
record, it MUST issue two or more queries for the resource record in
dispute. If no response is received within ten seconds, then, even
though its TTL may indicate that it is not yet due to expire, that
record SHOULD be promptly flushed from the cache.

So it looks like an optional feature according to the RFC, but would be nice to have (if it's not there already, I'm new to this library).

@bdraco
Copy link
Member
bdraco commented Sep 24, 2024

This isn't implemented, but a PR to do so would be welcome

@lenard-mosys
Copy link
Author

Cool! I can't promise anything, but I might try if I find the time. Anyway, I think the rough outline of such a feature would be:

  • a (possibly synchronous) method of Zeroconf and AsyncZeroconf that requests this reconfirmation of a given cache record. Doesn't return anything, semantically it just "pokes" the cache.
  • If reconfirmation fails then users of Zeroconf are notified similarly as if the resource was flushed due to TTL expiration (I assume that browsers get a ServiceStateChange.Removed, not sure if they get any other metadata, or if they need to).

For naming I could think of these options:

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

2 participants
0