For what it's worth, we've internally been using roughly these steps for
years to re-initialize c-ares on network change events:
- Notify clients that have pending requests
- Destroy ares channels
- Destroy ares (ares_library_cleanup())
- Reset some internal bookkeeping
- Initialize ares
Correct, any patch should take other OS's into account. Even MacOS doesn't use resolv.conf these days. A linux-only
solution is a non-starter. That said, I'd think at least initially any focus should be on an externally-callable
re-init. Some systems, like android, have notifications for
Hi Nicolas,
I would also like to see the official support of c-ares for detection of
resolv configuration change.
However the main blocker was that the implementation of my patch was not
taking into account other OS types .. and more general solution was
needed. That is not just specific for
Hi all,
This is would be my first contribution to the library and before starting to
code, I would like to have your opinion on the following points:
I am thinking on implementing a "reinit" function based on the following closed
PR (https://github.com/c-ares/c-ares/pull/272).
My main concern