udp: fix renaming ipbuf->ipbytes

This commit is contained in:
Jimmy Zelinskie 2015-02-25 21:56:37 -05:00
parent 8deef98874
commit 5af37be85c

View file

@ -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))
}