Skip to content

Kerberos requests fail if PING is blocked by firewall #419

@marius-klimantavicius

Description

@marius-klimantavicius

Describe the bug
Exception after upgrading to latest version:

System.AggregateException: One or more errors occurred. (Ping xxxxxxxx returned TimedOut)
---> System.Net.NetworkInformation.PingException: Ping xxxxxxxx returned TimedOut
at Kerberos.NET.Transport.KerberosTransportBase.PingAsync(DnsRecord record, CancellationToken cancellationToken) in D:\a\Kerberos.NET\Kerberos.NET\Kerberos.NET\Client\Transport\KerberosTransportBase.cs:line 194
--- End of inner exception stack trace ---
at TaskExtensions.GetFastestAsync[TSource,TResult](IEnumerable`1 source, Func`3 task, CancellationToken cancellationToken) in D:\a\Kerberos.NET\Kerberos.NET\Kerberos.NET\TaskExtensions.cs:line 40
at Kerberos.NET.Transport.KerberosTransportBase.SelectedPreferredInstance(String domain, String servicePrefix, IEnumerable`1 results, Int32 defaultPort) in D:\a\Kerberos.NET\Kerberos.NET\Kerberos.NET\Client\Transport\KerberosTransportBase.cs:line 185

Expected behavior
Random is selected if all pings fail (+automatically select if only one is configured/available).

Preferably an option to disable fastest selection via PING.
Seems to have been introduced: 3bf4b3d

Additional
In our environment we have an extremely strict firewall that allows only and only the explicit connections (PING is not one them) so while we are able to connect to DC we are unable to PING them to figure out whether they are alive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions