mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 02:45:11 -05:00
correct EDNS responses (#96)
Tests updated as well and all the middleware. And Prometheus renamed to metrics (directive is still prometheus).
This commit is contained in:
@@ -32,3 +32,14 @@ func Edns0Version(req *dns.Msg) (*dns.Msg, error) {
|
||||
|
||||
return m, errors.New("EDNS0 BADVERS")
|
||||
}
|
||||
|
||||
// edns0Size returns a normalized size based on proto.
|
||||
func edns0Size(proto string, size int) int {
|
||||
if proto == "tcp" {
|
||||
return dns.MaxMsgSize
|
||||
}
|
||||
if size < dns.MinMsgSize {
|
||||
return dns.MinMsgSize
|
||||
}
|
||||
return size
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user