Bug 524 - max-udp-size not effective to non-EDNS0 queries.
max-udp-size not effective to non-EDNS0 queries.
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
unspecified
All All
: P5 minor
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-14 21:16 CEST by Daisuke HIGASHI
Modified: 2013-09-16 11:07 CEST (History)
1 user (show)

See Also:


Attachments
patch (1.20 KB, application/octet-stream)
2013-09-14 21:16 CEST, Daisuke HIGASHI
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daisuke HIGASHI 2013-09-14 21:16:28 CEST
Created attachment 238 [details]
patch

(This is Unbound-trunk/1.4.21-RC bug)

max-udp-size (especially < 512) is not effective to non-EDNS0 queries.

How to produce:
 - set unbound.conf "max-udp-size: 20"
 - dig @::1 unbound.net +ignore +noedns
 -> Unbound returns normal reply. It should be TC reply because obviously reply size exceeds 20bytes.

Here is a patch. Note that this patch also checks "edns.bufsize < LDNS_HEADER_SIZE" for non-EDNS0 queries too.

Regards,
 Daisuke HIGASHI
Comment 1 Wouter Wijngaards 2013-09-16 11:07:50 CEST
Hi Daisuke,

Committed and it may make it into the 1.4.21 release :-)

Thanks for the fast bug report,
   Wouter