mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-23 06:09:11 +07:00
fix: RefineSourceToShow should use dst instead of destToSend
This commit is contained in:
@ -154,7 +154,7 @@ func (c *ControlPlane) handlePkt(data []byte, src, dst netip.AddrPort, outboundI
|
||||
if c.log.IsLevelEnabled(logrus.DebugLevel) && len(dnsMessage.Questions) > 0 {
|
||||
q := dnsMessage.Questions[0]
|
||||
c.log.Tracef("UDP(DNS) %v <-[%v]-> Cache: %v %v",
|
||||
RefineSourceToShow(src, destToSend.Addr()), outbound.Name, strings.ToLower(q.Name.String()), q.Type,
|
||||
RefineSourceToShow(src, dst.Addr()), outbound.Name, strings.ToLower(q.Name.String()), q.Type,
|
||||
)
|
||||
}
|
||||
return nil
|
||||
@ -273,7 +273,7 @@ func (c *ControlPlane) handlePkt(data []byte, src, dst netip.AddrPort, outboundI
|
||||
// If the udp endpoint has been not alive, remove it from pool and get a new one.
|
||||
if !isNew && !ue.Dialer.MustGetAlive(l4proto, ipversion) {
|
||||
c.log.WithFields(logrus.Fields{
|
||||
"src": src.String(),
|
||||
"src": RefineSourceToShow(src, dst.Addr()),
|
||||
"network": string(l4proto) + string(ipversion),
|
||||
"dialer": ue.Dialer.Name(),
|
||||
}).Debugln("Old udp endpoint is not alive and removed")
|
||||
@ -342,7 +342,7 @@ func (c *ControlPlane) handlePkt(data []byte, src, dst netip.AddrPort, outboundI
|
||||
"qname": strings.ToLower(q.Name.String()),
|
||||
"qtype": q.Type,
|
||||
}).Infof("%v <-> %v",
|
||||
RefineSourceToShow(src, destToSend.Addr()), RefineAddrPortToShow(destToSend),
|
||||
RefineSourceToShow(src, dst.Addr()), RefineAddrPortToShow(destToSend),
|
||||
)
|
||||
} else {
|
||||
// TODO: Set-up ip to domain mapping and show domain if possible.
|
||||
@ -351,7 +351,7 @@ func (c *ControlPlane) handlePkt(data []byte, src, dst netip.AddrPort, outboundI
|
||||
"outbound": outbound.Name,
|
||||
"dialer": realDialer.Name(),
|
||||
}).Infof("%v <-> %v",
|
||||
RefineSourceToShow(src, destToSend.Addr()), RefineAddrPortToShow(destToSend),
|
||||
RefineSourceToShow(src, dst.Addr()), RefineAddrPortToShow(destToSend),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user