Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] keyutils: create a common DNS interface
@ 2022-07-07 19:15 Enzo Matsumiya
  2022-07-07 19:15 ` [PATCH 1/3] key.dns: " Enzo Matsumiya
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Enzo Matsumiya @ 2022-07-07 19:15 UTC (permalink / raw)
  To: dhowells
  Cc: linux-cifs, smfrench, pc, ronniesahlberg, nspmangalore,
	Enzo Matsumiya

Hi David, list,

In the following patches, I moved all the common DNS functionality in
keyutils into key.dns.{h,c} with the aim to:

- Improve code readability
- ... by restructuring the DNS functions
- Use libresolv for any query, and not only AFSDB/SRV types. This allows
  A/AAAA queries to also have extra data fetched (such as TTL, for example)
- Add flexibility to add/remove/update any DNS query type

Patch 1/3: moves the common DNS parts into key.dns.{h.c}, rework on the
	   query part to have it as generic as possible, adapt callers
	   to the new structure.
Patch 2/3: refactor read_config() to make it more structured, hence more
	   flexible (idea is to have it ready for new config options).
Patch 3/3: adds a "ns=ADDR" callout option to allow callers to specify
	   custom nameservers for their queries. Custom as in, different
	   from the system's default (usually resolv.conf).

I've been using most of this code on my day-to-day to aid my
CIFS debugging activities and I thought it'd be good to have it
upstream.

Reviews, feedback, testing are all welcome.


Cheers,

Enzo Matsumiya (3):
  key.dns: create a common DNS interface
  key.dns_resolver: refactor read_config()
  key.dns: allow to use custom nameservers

 Makefile           |   6 +-
 dns.afsdb.c        | 358 +++++-------------
 key.dns.c          | 891 +++++++++++++++++++++++++++++++++++++++++++++
 key.dns.h          | 260 +++++++++++--
 key.dns_resolver.c | 683 +++++++++++++---------------------
 5 files changed, 1457 insertions(+), 741 deletions(-)
 create mode 100644 key.dns.c

-- 
2.35.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-07 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-07 19:15 [PATCH 0/3] keyutils: create a common DNS interface Enzo Matsumiya
2022-07-07 19:15 ` [PATCH 1/3] key.dns: " Enzo Matsumiya
2022-07-07 19:15 ` [PATCH 2/3] key.dns_resolver: refactor read_config() Enzo Matsumiya
2022-07-07 19:15 ` [PATCH 3/3] key.dns: allow to use custom nameservers Enzo Matsumiya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox