From d065e722a1e6f88f7efc15ad1be3ba3f175e3315 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Mon, 12 Feb 2018 11:55:39 +0800 Subject: [PATCH] Added Additional Debug output and error message for #854 --- transport/internet/udp/hub.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/transport/internet/udp/hub.go b/transport/internet/udp/hub.go index 5fb26759..99fb004e 100644 --- a/transport/internet/udp/hub.go +++ b/transport/internet/udp/hub.go @@ -150,6 +150,11 @@ func (h *Hub) start() { payload.source = net.UDPDestination(net.IPAddress(addr.IP), net.Port(addr.Port)) if h.option.ReceiveOriginalDest && noob > 0 { payload.originalDest = RetrieveOriginalDest(oobBytes[:noob]) + if !payload.originalDest.IsValid() { + newError("failed to read UDP Original Destination").WriteToLog() + } else { + newError("UDP Original Destination: ", payload.originalDest.String()).AtDebug().WriteToLog() + } } h.queue.Enqueue(payload) }