log something when we drop a UDP packet
This commit is contained in:
1 parent
5acefd5d23
commit
d1de3eac3e
1 file changed
+2
-1
+2
-1
@@ -186,7 +186,8 @@ func (router *Router) udpReader(conn *net.UDPConn, po PacketSink) {
|
|||||||
log.Println("ignoring UDP read error", err)
|
log.Println("ignoring UDP read error", err)
|
||||||
continue
|
continue
|
||||||
} else if n < NameSize {
|
} else if n < NameSize {
|
||||||
continue // TODO something different?
|
log.Println("ignoring too short UDP packet from", sender)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
name := PeerNameFromBin(buf[:NameSize])
|
name := PeerNameFromBin(buf[:NameSize])
|
||||||
packet := make([]byte, n-NameSize)
|
packet := make([]byte, n-NameSize)
|
||||||
|
|||||||
Reference in new issue
Block a user