Skip to content

Commit 271e3d3

Browse files
committed
dnsx/resolver: override proxy after final determineTransports call
1 parent 15d4476 commit 271e3d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

intra/dnsx/transport.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,10 @@ runagain:
584584
var res2 []byte
585585
var nonalg, ans1 *dns.Msg // alg'd answer
586586

587-
netid := xdns.NetAndProxyID(NetTypeUDP, pids)
587+
// t, t2 could be different from user-selected sid & pid
588+
// when sid and pid fallback on Default or System DNS
589+
// in which case, selected proxy must be overriden
590+
netid := xdns.NetAndProxyID(NetTypeUDP, overrideProxyIfNeeded(pids, idstr(t), idstr(t2)))
588591

589592
// with t2 as the secondary transport, which could be nil
590593
nonalg, ans1, err = r.gateway.q(t, t2, presetIPs, netid, uid, msg, smm)

0 commit comments

Comments
 (0)