diff --git a/lib/Zonemaster/Engine/Nameserver.pm b/lib/Zonemaster/Engine/Nameserver.pm index 2a0b87dac..4f916cf7c 100644 --- a/lib/Zonemaster/Engine/Nameserver.pm +++ b/lib/Zonemaster/Engine/Nameserver.pm @@ -406,7 +406,13 @@ sub _query { $flags{q{fallback}} = $href->{q{fallback}} // Zonemaster::Engine::Profile->effective->get( q{resolver.defaults.fallback} ); $flags{q{recurse}} = $href->{q{recurse}} // Zonemaster::Engine::Profile->effective->get( q{resolver.defaults.recurse} ); $flags{q{timeout}} = $href->{q{timeout}} // Zonemaster::Engine::Profile->effective->get( q{resolver.defaults.timeout} ); - $flags{q{edns_size}} = $href->{q{edns_size}} // $UDP_EDNS_QUERY_DEFAULT; + + if ( $flags{q{dnssec}} ) { + $flags{q{edns_size}} = $href->{q{edns_size}} // $UDP_EDNS_QUERY_DEFAULT; + } + else { + $flags{q{edns_size}} = $href->{q{edns_size}} // 0; + } if ( exists $href->{edns_details} ) { $flags{q{dnssec}} = $href->{edns_details}{do} // $flags{q{dnssec}}; @@ -794,7 +800,7 @@ The retransmission interval. Set the DO flag in the query. Defaults to false. If set to true, it becomes an EDNS query. -Value overridden by 'edns_details->do' (if also given). More details in 'edns_details' below. +Value overridden by C (if also given). More details in L below. =item debug @@ -826,10 +832,10 @@ If set to true, prevents a server to be black-listed on a query in case there is =item edns_size -Set the EDNS0 UDP maximum size. Defaults to 512. +Set the EDNS0 UDP maximum size. Defaults to 0, or 512 if the query is an EDNS query. -Used only when the query is an EDNS query. Does not enable on its own the query to be an EDNS query. -Value overridden by 'edns_details->size' (if also given). More details in 'edns_details' below. +Setting a value other than 0 will also implicitly enable the query to be an EDNS query. +Value overridden by C (if also given). More details in L below. =item edns_details @@ -838,10 +844,10 @@ A hash. An empty hash or a hash with any keys below will enable the query to be The currently supported keys are 'version', 'z', 'do', 'rcode', 'size' and 'data'. See L for more details (key names prefixed with 'edns_'). -Note that flag 'edns_size' also exists (see above) and has the same effect as 'edns_details->size', although the value of the +Note that flag L also exists (see above) and has the same effect as C, although the value of the latter will take precedence if both are given. -Similarly, note that flag 'dnssec' also exists (see above) and has the same effect as 'edns_details->do', although the value of the +Similarly, note that flag L also exists (see above) and has the same effect as C, although the value of the latter will take precedence if both are given. =back