From 59e50bd614cd44436a6be685b45e643bebd0261c Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 6 Aug 2015 08:55:48 +1000 Subject: [PATCH] Log who's giving us zero ports over PEX In the long run this will help determine why this happens. --- client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client.go b/client.go index 0eb199f1..2bfae3b7 100644 --- a/client.go +++ b/client.go @@ -1662,6 +1662,10 @@ func (me *Client) connectionLoop(t *torrent, c *connection) error { me.mu.Lock() me.addPeers(t, func() (ret []Peer) { for i, cp := range pexMsg.Added { + if cp.Port == 0 { + log.Printf("peer gave zero port peer over PEX\n\t%s", c) + continue + } p := Peer{ IP: make([]byte, 4), Port: int(cp.Port),