From: "Aurélien Aptel" <aaptel@suse.com>
To: David Howells <dhowells@redhat.com>,
trond.myklebust@hammerspace.com, anna.schumaker@netapp.com,
sfrench@samba.org
Cc: dhowells@redhat.com, linux-nfs@vger.kernel.org,
linux-cifs@vger.kernel.org, linux-afs@lists.infradead.org,
linux-fsdevel@vger.kernel.org
Subject: Re: Making the in-kernel DNS resolver handle server lists
Date: Thu, 13 Sep 2018 10:38:37 +0200 [thread overview]
Message-ID: <87lg854ws2.fsf@suse.com> (raw)
In-Reply-To: <17451.1536750676@warthog.procyon.org.uk>
David Howells <dhowells@redhat.com> writes:
> The payload handed to the kernel currently looks like something assembled from
> the data obtained from a bunch of SRV records that have been further looked up
> to A or AAAA.
I was wondering recently if the current kernel API lets you to access
all A/AAAA records in case a same domain uses multiple ones. It seems
not, is this correct?
> In the kernel it might get parsed to something like:
>
> struct address {
> union {
> struct sockaddr_in sin;
> struct sockaddr_in6 sin6;
> };
> };
You probably want struct sockaddr_storage here.
>
> struct server {
> unsigned short port;
> unsigned short pref; // From SRV
> unsigned short weight; // From SRV
> unsigned char ipproto; // IPPROTO_*
> unsigned int nr_addrs; // May be 0
> struct address *addrs;
> };
>
> struct server_list {
> unsigned int nr_servers;
> struct server servers[];
> };
>
> Is this something that NFS or CIFS (or anything else for that matter) could
> find useful?
That sounds useful indeed. I'm currently thinking about a failover
mechanism for DFS (symbolic links across servers in cifs). The protocol
supports multiple possible targets for the link in case one is down. The
targets are usually using hostnames so with your change we could have a
second layer of failover at the DNS level.
> I also have this loading information from a configuration file as a
> backup/override of the DNS. Could that also be useful to NFS/CIFS?
Cheers,
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2018-09-13 13:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 11:11 Making the in-kernel DNS resolver handle server lists David Howells
2018-09-12 20:53 ` Steve French
2018-09-12 21:18 ` David Howells
2018-09-12 22:27 ` Steve French
2018-09-13 8:38 ` Aurélien Aptel [this message]
2018-09-13 9:14 ` David Howells
2018-09-13 18:30 ` Steve French
2018-09-13 18:30 ` Steve French
2018-09-13 20:01 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lg854ws2.fsf@suse.com \
--to=aaptel@suse.com \
--cc=anna.schumaker@netapp.com \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=sfrench@samba.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.