Closed pil78 closed 10 months ago
PS: This has started after migration our application from 2.x.x to 3.x.x version. (We changed our code from old .net framework to .net 6)
The data you provided contains a malformed DNS message, so what should happen with that. In my tests this will not crash the server, only the ExceptionThrown event is fired and it is up to you, to handle the situation. One solution would be to just ignore that exception in the EventHandler.
Thanks for answering. Yep, I handled the error and ignoring - what I did for now.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, during usage of you library sometimes we track the exception:.get_Item(Int32 index)
at ARSoft.Tools.Net.Dns.DnsMessageBase.ParseDomainName(IList
System.Exception: Error parsing dns query ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.ArraySegment
1.System.Collections.Generic.IList1 resultData, Int32 currentPosition, Int32& uncompressedLabelBytes) at ARSoft.Tools.Net.Dns.DnsQuestion.Parse(IList
1 data, Int32& currentPosition) at ARSoft.Tools.Net.Dns.DnsMessageBase.ParseQuestionSection(IList1 data, Int32& currentPosition, Int32 recordCount) at ARSoft.Tools.Net.Dns.DnsMessageBase.ParseInternal(IList
1 data, SelectTsigKey tsigKeySelector, Byte[] originalMac) at ARSoft.Tools.Net.Dns.DnsMessageBase.CreateByFlag(IList1 package, SelectTsigKey tsigKeySelector, Byte[] originalMac) at ARSoft.Tools.Net.Dns.DnsServer.ProcessRawPackageAsync(IServerConnection connection, DnsReceivedRawPackage queryPackage, CancellationToken token) --- End of inner exception stack trace --- at ARSoft.Tools.Net.Dns.DnsServer.ProcessRawPackageAsync(IServerConnection connection, DnsReceivedRawPackage queryPackage, CancellationToken token)
Our dev-ops engineer managed to reproduce this with small powershell sceipt: `function Send-UdpDatagram { Param ([string] $EndPoint, [int] $Port, [string] $Message)
}
While ($True){ Write-Host "Send Message" Send-UdpDatagram -EndPoint "127.0.0.1" -Port 53 -Message "F/*/**966jgFF" }` Could you please check this and fix, because I have no ways to override or implement this by myself.