minor bug in locate_kdc.c with getaddrinfo
Jeffrey Altman
jaltman at secure-endpoints.com
Sun Oct 16 14:57:33 EDT 2011
This patch should not be required. Windows ws2tcpip.h defines the EAI_
values in terms of WSA errors. For example:
#define EAI_NONAME WSAHOST_NOT_FOUND
Jeffrey Altman
On 10/15/2011 2:13 PM, Chris Hecker wrote:
>
> Here's a patch for a minor WIN32 bug in the getaddrinfo return value
> (called from krb5int_add_host_to_list). getaddrinfo will return
> WSANO_DATA in some cases (like an address in the hosts file that's on an
> unplugged ethernet cable that was plugged in recently), but that's not
> mapped to an EAI error for some reason (there's a related comment in
> ws2tcpip.h that doesn't help much), so the translate function returns
> EINVAL and the whole request to the KDC fails instead of just using the
> other working KDCs in the list. This patch fixes it so the unreachable
> kdc is ignored.
>
> Thanks,
> Chris
>
> PS. I also sent a test message to the security alias for another bug
> report I'm going to send there, but that was my first pgp mail ever, so
> I don't know if it worked (or even arrived).
>
>
> === modified file 'lib/krb5/src/lib/krb5/os/locate_kdc.c'
> --- lib/krb5/src/lib/krb5/os/locate_kdc.c 2011-07-21 10:42:51 +0000
> +++ lib/krb5/src/lib/krb5/os/locate_kdc.c 2011-10-15 07:21:25 +0000
> @@ -163,6 +163,10 @@
> case EAI_NODATA:
> #endif
> case EAI_NONAME:
> +#if _WIN32
> + case WSANO_DATA: /* getaddrinfo can return this on destination
> unreachable,
> + but it's not mapped to an EAI_* error */
> +#endif
> /* Name not known or no address data, but no error. Do
> nothing more. */
> return 0;
>
>
> ________________________________________________
> Kerberos mailing list Kerberos at mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
Url : http://mailman.mit.edu/pipermail/kerberos/attachments/20111016/89d5b2d1/attachment.bin
More information about the Kerberos
mailing list