Skip to content

Commit e3fd1a2

Browse files
committed
dnsx/alg,plus: m supress err logs
1 parent 2e1f713 commit e3fd1a2

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

intra/dnsx/alg.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,21 +1539,21 @@ func (t *dnsgateway) xLocked(maybeAlg netip.Addr, usestale bool, uid string, tid
15391539
unnated = t.maybeUndoNat64Locked(realips...)
15401540
} // else: send realips as is
15411541

1542-
logeif(!hasrealips && (!undidAlg || !undidPtr))("alg: dns64: for %v[%s] (didnotAlg? %t / fresh? %t / undidAlg? %t / undidPtr? %t / staleok? %t) algip(%v) => realips(%v) => unnated(%v); until: %s",
1542+
logeif(!hasrealips && (!usestale && (!undidAlg || !undidPtr)))("alg: dns64: for %v[%s] (didnotAlg? %t / fresh? %t / undidAlg? %t / undidPtr? %t / staleok? %t) algip(%v) => realips(%v) => unnated(%v); until: %s",
15431543
tids, uid, didnotAlg, fresh, undidPtr, undidAlg, usestale, unmapped, realips, unnated, until)
15441544

15451545
if len(unnated) > 0 { // unnated is already de-duplicated
15461546
return unnated, undidAlg
15471547
}
15481548

15491549
if !hasrealips {
1550-
// when realips are empty but one of undidAlg / undidPtr is not false,
1550+
// when realips is empty but one of undidAlg / undidPtr is not false,
15511551
// it means the client code may retry re-resolving the corresponding
15521552
// domain to freshen up alg mapping; which is to say, sending empty
15531553
// realips instead of unmapped as-is is a way to signal that
15541554
// the alg mapping is stale.
15551555
if undidAlg || undidPtr {
1556-
return realips, undidAlg
1556+
return realips, undidAlg // realips is empty here
15571557
}
15581558
// no algip, no realips, no unnated;
15591559
// ptr + nat alg mapping do not exist / apply;

intra/dnsx/plus.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ func (t *plus) forward(network string, q *dns.Msg, outSmm *x.DNSSummary, all ...
241241

242242
finalsmm = cursmm
243243

244-
loged(err != nil || failed || noans)("plus: queried %s for %s:%d; data: %s, code: %d, err? %v",
245-
idstr(tr), qname, qtyp, finalsmm.RData, finalsmm.RCode, err)
244+
loged(err != nil || failed)("plus: queried %s for %s:%d; data: %s [noans? %t], code: %d, err? %v",
245+
idstr(tr), qname, qtyp, finalsmm.RData, noans, finalsmm.RCode, err)
246246

247247
if err != nil || ans == nil {
248248
errs = core.JoinErr(errs, core.OneErr(err, errNoAnswer))

0 commit comments

Comments
 (0)