Skip to content

pid mismatch int != uint16 #6

@sebstyle

Description

@sebstyle

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 {
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions