[PATCH 2/4] Implement a DNS Resolver Module

Steve French smfrench at gmail.com
Tue Jul 20 11:39:43 EDT 2010


On Tue, Jul 20, 2010 at 10:25 AM, Jeff Layton <jlayton at redhat.com> wrote:
> On Wed, 07 Jul 2010 10:14:11 +0100
> David Howells <dhowells at redhat.com> wrote:
>
>> From: Wang Lei <wang840925 at gmail.com>
>>
>
> ----------------[snip]------------------
>
>> +/**
>> + * dns_resolve_unc_to_ip - Resolve UNC server name to ip address.
>> + * @unc: UNC path specifying the server
>> + * @ip_addr: Where to return the IP address.
>> + *
>> + * The IP address will be returned in string form, and the caller is
>> + * responsible for freeing it.
>> + *
>> + * Returns 0 on success, -ve on error.
>> + */
>> +int
>> +dns_resolve_unc_to_ip(const char *unc, char **ip_addr)

> Another (somewhat minor) nit that Steve F pointed out. The function
> that this replaces in cifs can deal with numeric scopeid's as part of
> the address. For instance:
>
>    fea1::1%2
>
> ...where the scopeid here is "2". For linux machines, the scopeid
> essentially equates to an interface index and really has no meaning
> outside of the machine.
>
> It's not clear to me that we'd ever see one of those in a hostname that
> we want to parse here, but it might not hurt to plan for it and deal
> with it appropriately.

I think it is plausible that the scopeid/interface matters here (I heard the
request before and it seems reasonable).   For IPv6 in UNC names
Windows maps : to -- IIRC so scope ids look a little different,
but I think they support them

-- 
Thanks,

Steve



More information about the linux-afs mailing list