mirror of
https://github.com/coredns/coredns.git
synced 2026-10-17 15:55:47 -04:00
core: Reject conflicting TLS policies on shared listeners. (#8565)
* core: Reject conflicting TLS policies on shared listeners. This PR tries to fix the issue when multiple zones share a DoT listener, CoreDNS can apply one sibling block’s tls.Config to all zones, allowing weaker TLS or client-auth settings to override a stricter zone. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix ACME Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --------- Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -298,8 +298,10 @@ func propagateConfigParams(configs []*Config) {
|
||||
c.Stacktrace = c.firstConfigInBlock.Stacktrace
|
||||
c.NumSockets = c.firstConfigInBlock.NumSockets
|
||||
|
||||
// Fork TLSConfig for each encrypted connection
|
||||
// Fork TLSConfig for each encrypted connection while preserving the
|
||||
// listener-wide policy identity used to compare dynamic callbacks.
|
||||
c.TLSConfig = c.firstConfigInBlock.TLSConfig.Clone()
|
||||
c.tlsConfigIdentity = c.firstConfigInBlock.tlsConfigIdentity
|
||||
c.ReadTimeout = c.firstConfigInBlock.ReadTimeout
|
||||
c.WriteTimeout = c.firstConfigInBlock.WriteTimeout
|
||||
c.IdleTimeout = c.firstConfigInBlock.IdleTimeout
|
||||
|
||||
Reference in New Issue
Block a user