log something when we drop a UDP packet

This commit is contained in:
Matthias Radestock committed 2014-10-15 15:56:23 +01:00
1 parent 5acefd5d23
commit d1de3eac3e
1 file changed
+2 -1
+2 -1
View File
@@ -186,7 +186,8 @@ func (router *Router) udpReader(conn *net.UDPConn, po PacketSink) {
log.Println("ignoring UDP read error", err)
continue
} else if n < NameSize {
continue // TODO something different?
log.Println("ignoring too short UDP packet from", sender)
continue
}
name := PeerNameFromBin(buf[:NameSize])
packet := make([]byte, n-NameSize)