diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-03-26 18:16:07 +0900 |
---|---|---|
committer | Tanaka Akira <akr@fsij.org> | 2021-05-11 12:37:34 +0900 |
commit | 9edc162583a4f685332239f6249745ad9b518cbe (patch) | |
tree | cccde878f300283fc5e8fcd615bc8e15fc939249 /lib/weakref.rb | |
parent | 5b0abba9317f206913cf2e599d0dac7e9dbd0baa (diff) | |
download | ruby-9edc162583a4f685332239f6249745ad9b518cbe.tar.gz |
[ruby/resolv] Fix confusion of received response message
This is a follow up for commit 33fb966197f1 ("Remove sender/message_id
pair after response received in resolv", 2020-09-11).
As the @senders instance variable is also used for tracking transaction
ID allocation, simply removing an entry without releasing the ID would
eventually deplete the ID space and cause
Resolv::DNS.allocate_request_id to hang.
It seems the intention of the code was to check that the received DNS
message is actually the response for the question made within the method
earlier. Let's have it actually do so.
[Bug #12838] https://bugs.ruby-lang.org/issues/12838
[Bug #17748] https://bugs.ruby-lang.org/issues/17748
https://github.com/ruby/resolv/commit/53ca9c9209
Diffstat (limited to 'lib/weakref.rb')
0 files changed, 0 insertions, 0 deletions