@@ -1011,10 +1011,11 @@ func (t *dnsgateway) querySecondary(t2 Transport, uid, network string, msg *dns.
10111011 log .V ("alg: querySecondary: skip; sec transport %s; nores? %t, err? %v" , idstr (t2 ), r == nil , err )
10121012 result .smm .Msg = errNotEnoughAnswers .Error ()
10131013 return
1014- } else if a , blocklistnames := t .rdns .blockA ( /*may be nil*/ t2 , nil , msg , r , result .smm .Blocklists ); a != nil {
1014+ } else if a , blockedtarget , blocklistnames := t .rdns .blockA ( /*may be nil*/ t2 , nil , msg , r , result .smm .Blocklists ); a != nil {
10151015 // if "a" is not nil, then the r is blocked
10161016 if len (blocklistnames ) > 0 {
10171017 result .smm .Blocklists = blocklistnames
1018+ result .smm .BlockedTarget = blockedtarget
10181019 }
10191020 // when rdns.blockA blocks, A/AAAA must be 0.0.0.0/::
10201021 // and HTTPS/SVCB is an empty answer section
@@ -1028,6 +1029,7 @@ func (t *dnsgateway) querySecondary(t2 Transport, uid, network string, msg *dns.
10281029 } else {
10291030 if len (blocklistnames ) > 0 {
10301031 result .smm .Blocklists = blocklistnames
1032+ result .smm .BlockedTarget = blockedtarget
10311033 }
10321034 if xdns .AQuadAUnspecified (r ) {
10331035 // A/AAAA must be 0.0.0.0/::, set UpstreamBlocks to true
@@ -1200,6 +1202,7 @@ func (t *dnsgateway) q(t1, t2 Transport, preset []netip.Addr, network, uid strin
12001202
12011203 // inform kt of secondary blocklists, if any
12021204 smm .Blocklists = secres .smm .Blocklists
1205+ smm .BlockedTarget = secres .smm .BlockedTarget
12031206 smm .UpstreamBlocks = secres .smm .UpstreamBlocks || smm .UpstreamBlocks
12041207
12051208 if smm .UpstreamBlocks || len (secres .smm .Msg ) > 0 {
@@ -2261,9 +2264,10 @@ func withPresetSummary(smm *x.DNSSummary, reqSent, fixed bool) {
22612264 smm .Server = "127.5.3.9"
22622265 }
22632266 smm .Server = PrefixFor (id ) + smm .Server
2264- smm .Blocklists = "" // blocklists are not honoured
2265- smm .PID = "" // no relay is used
2266- smm .RPID = "" // no hops either
2267+ smm .Blocklists = "" // blocklists are not honoured
2268+ smm .BlockedTarget = "" // no targets are blocked
2269+ smm .PID = "" // no relay is used
2270+ smm .RPID = "" // no hops either
22672271}
22682272
22692273func idstr (t Transport ) string {
0 commit comments