ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:89421] [Ruby trunk Bug#15226] Resolv::DNS unable to handle responses larger than default size
       [not found] <redmine.issue-15226.20181016133558@ruby-lang.org>
@ 2018-10-16 13:35 ` tibor.repasi
  2019-08-27 19:23 ` [ruby-core:94618] [Ruby master Feature#15226] " merch-redmine
  1 sibling, 0 replies; 2+ messages in thread
From: tibor.repasi @ 2018-10-16 13:35 UTC (permalink / raw
  To: ruby-core

Issue #15226 has been reported by rtib (Tibor Repasi).

----------------------------------------
Bug #15226: Resolv::DNS unable to handle responses larger than default size
https://bugs.ruby-lang.org/issues/15226

* Author: rtib (Tibor Repasi)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
The actual implementation of Resolve::DNS defines [UDPSize = 512](https://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/resolv.rb?view=markup#l288) as default. There is no way to initialize a Resolv::DNS instance having non-default UDPSize, as well all socket reads will be limited to this size. Also, queries responding with larger and/or fragmented packets will result in an empty set after timeout and no error is raised.

Currently, Resolv::DNS is therefore limited usable in use-cases when a DNS response is larger than 512 bytes.

Desirable would be to have UDPSize as configurable attribute, instead of a hard coded constant.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:94618] [Ruby master Feature#15226] Resolv::DNS unable to handle responses larger than default size
       [not found] <redmine.issue-15226.20181016133558@ruby-lang.org>
  2018-10-16 13:35 ` [ruby-core:89421] [Ruby trunk Bug#15226] Resolv::DNS unable to handle responses larger than default size tibor.repasi
@ 2019-08-27 19:23 ` merch-redmine
  1 sibling, 0 replies; 2+ messages in thread
From: merch-redmine @ 2019-08-27 19:23 UTC (permalink / raw
  To: ruby-core

Issue #15226 has been updated by jeremyevans0 (Jeremy Evans).

Backport deleted (2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN)
ruby -v deleted (ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18])
Status changed from Open to Rejected
Tracker changed from Bug to Feature

RFC 1035 Section 2.3.4 specifies that UDP messages are limited to 512 octets or less.  RFC 6891 confirms this number unless you are using EDNS(0) extensions.  It does not appear that `Resolv::DNS` supports EDNS(0), therefore the limit of 512 bytes seems reasonable.  You can use `Resolv::DNS.const_set(:UDPSize, 1400)` or something like that if you would like to override the limit.

----------------------------------------
Feature #15226: Resolv::DNS unable to handle responses larger than default size
https://bugs.ruby-lang.org/issues/15226#change-81203

* Author: rtib (Tibor Repasi)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
The actual implementation of Resolve::DNS defines [UDPSize = 512](https://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/resolv.rb?view=markup#l288) as default. There is no way to initialize a Resolv::DNS instance having non-default UDPSize, as well all socket reads will be limited to this size. Also, queries responding with larger and/or fragmented packets will result in an empty set after timeout and no error is raised.

Currently, Resolv::DNS is therefore limited usable in use-cases when a DNS response is larger than 512 bytes.

Desirable would be to have UDPSize as configurable attribute, instead of a hard coded constant.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-27 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-15226.20181016133558@ruby-lang.org>
2018-10-16 13:35 ` [ruby-core:89421] [Ruby trunk Bug#15226] Resolv::DNS unable to handle responses larger than default size tibor.repasi
2019-08-27 19:23 ` [ruby-core:94618] [Ruby master Feature#15226] " merch-redmine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).