-
-
Notifications
You must be signed in to change notification settings - Fork 16k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay possibility to reuse transaction id when query is failing becau… (
#13446) …se of timeout Motivation: We should try to make it as unlikely as possible that we will reuse a transaction for a query while the remote peer still might send the response for the previously timed out query. Failing to do so put us in risk that we will not be able to map the response correctly. This reduces the risk of the following scenario: - Query is send to the remote nameeserver - Query is failed as the remote nameserver did not respond in the configured time - New query is send which uses the same transaction id as the failed one. While we use a random to generate these this can still happen as we only have 16bits for the id - nameserver sends back the response for the first query (that we already failed as timed out) - We lookup the query for the id and find the new one and try to complete it with the response for the "old query". - This fails as validation of hostname etc not matches. Modifications: If we fail a query because of a timeout or cancellation, delay the removal of the id from the context map. This will make the id not-reusable until the removal actually take place. Result: Much less likely to reuse an id while the remote nameserver might still respond to the old query
- Loading branch information
1 parent
bf8e779
commit b878314
Showing
2 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters