Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Do not leak DNS Request IDs #4981
While d1a760e fixed handling of compressed IPv6 addresses,
Currently every DNS request leaks single request id:
Given the fact that request ids are chosen from
This commit makes request id caching work by using same data for allocation and freeing.
This is not strictly true. The commit mentioned above diverges from the MRI behavior which don't have any
Hence they don't leak request ids here.
@fxposter oh sorry I should have checked. See: jruby/ruby@44fe41b#diff-5eaee83b511bb5c304d686f8f47dc6c2L773
That commit shows we maintain doing that in both sender and recv_reply. Note this is 2.3.x support but I should have realized you probably wanted this PR against jruby-9.1 branch and not master since master is for 2.4.x support atm (well no doubt you will want it in all the places but we have not put out jruby 9.2 yet).
Could I ask two favors?
The great thing about this work is fixing up part of our MRI stdlib changeset. One less difference is one less headache at some point in the future :)