mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-13 08:13:32 -07:00
udp: fix renaming ipbuf->ipbytes
This commit is contained in:
+1
-1
@@ -126,7 +126,7 @@ func (s *Server) newAnnounce(packet []byte, ip net.IP) (*models.Announce, error)
|
||||
}
|
||||
|
||||
ipbytes := packet[84:88]
|
||||
if s.config.AllowIPSpoofing && !bytes.Equal(ipbuf, []byte{0, 0, 0, 0}) {
|
||||
if s.config.AllowIPSpoofing && !bytes.Equal(ipbytes, []byte{0, 0, 0, 0}) {
|
||||
ip = net.ParseIP(string(ipbytes))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user