@@ -141,12 +141,13 @@ type Transport interface {
141141
142142// TransportMult is a hybrid: transport and a multi-transport.
143143type TransportMult interface {
144- x. DNSTransportMult
144+ TransportMultInternal
145145 Transport
146146}
147147
148148type TransportMultInternal interface {
149149 x.DNSTransportMult
150+ TransportProviderInternal
150151}
151152
152153type TransportMultProviderInternal interface {
@@ -159,13 +160,6 @@ type TransportProviderInternal interface {
159160 x.DNSTransportProvider
160161 // GetInternal returns the internal transport interface for the given ID.
161162 GetInternal (id string ) (Transport , error )
162-
163- // special purpose pre-defined transports:
164-
165- // Gateway implements a DNS ALG transport
166- Gateway () Gateway
167- // MDNS returns the mdns transport, if available; error otherwise.
168- MDNS () (MDNSTransport , error )
169163}
170164
171165type Resolver interface {
@@ -181,6 +175,13 @@ type Resolver interface {
181175 // Serve reads DNS query from conn and writes DNS answer to conn
182176 Serve (proto string , conn protect.Conn , uid string ) (rx , tx int64 , errs []error )
183177
178+ // special purpose pre-defined transports:
179+
180+ // Gateway implements a DNS ALG transport
181+ Gateway () Gateway
182+ // MDNS returns the mdns transport, if available; error otherwise.
183+ MDNS () (MDNSTransport , error )
184+
184185 // StopAll stops all transports.
185186 StopAll ()
186187
@@ -839,9 +840,10 @@ func (r *resolver) determineTransport(id string) Transport {
839840 if t0 != nil && (t1 == nil || ! mayusedefault || activeTransport (t0 )) {
840841 return t0
841842 } else if t1 != nil && (! mayusedefault || activeTransport (t1 )) {
843+ log .W ("dns: fwd: %s missing or inactive; using %s instead" , id0 , id1 )
842844 return t1
843845 } else if tf != nil && mayusedefault {
844- log .W ("dns: fwd: %s is missing; using default" , id0 )
846+ log .W ("dns: fwd: %s & %s missing or inactive ; using default" , id0 , id1 )
845847 return tf // todo: assert tf != nil?
846848 }
847849
0 commit comments