mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-02-15 12:23:58 +00:00
ResolverDnsCache: prefering auth response when there is a tie with cache.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2020 Shreyas Zare (shreyas@technitium.com)
|
||||
Copyright (C) 2021 Shreyas Zare (shreyas@technitium.com)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -55,7 +55,7 @@ namespace DnsServerCore.Dns
|
||||
|
||||
if ((authResponse.Authority.Count > 0) && (cacheResponse.Authority.Count > 0))
|
||||
{
|
||||
if (authResponse.Authority[0].Name.Length > cacheResponse.Authority[0].Name.Length)
|
||||
if (authResponse.Authority[0].Name.Length >= cacheResponse.Authority[0].Name.Length)
|
||||
return authResponse;
|
||||
|
||||
return cacheResponse;
|
||||
|
||||
Reference in New Issue
Block a user