Skip to content

pid mismatch int != uint16 #6

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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