udp: fix renaming ipbuf->ipbytes
This commit is contained in:
parent
8deef98874
commit
5af37be85c
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue