batch_ping
batch_ping copied to clipboard
pid mismatch int != uint16
pid is stored as int but gets converted to uint16 and thus will never match when processPacket compares int on batchpinger to uint16 from packet
// Pinger.SendICMP
xid := p.id & 0xffff
body := &icmp.Echo{
ID: xid,
Seq: seqID,
Data: t,
}
// BatchPinger.processPacket
xid := p.id & 0xffff
if pkt.ID != xid {
...
}