Skip to content

Commit

Permalink
fix(icmp): drop all datagram which control type not zero
Browse files Browse the repository at this point in the history
  • Loading branch information
r3inbowari committed Nov 17, 2023
1 parent dfe5b15 commit 1c32d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion speedtest/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func (s *Server) ICMPPing(
}
buf := make([]byte, 20+echoOptionDataSize+8)
_, err = dialContext.Read(buf)
if err != nil {
if err != nil || buf[20] != 0x00 {
failTimes++
continue
}
Expand Down

0 comments on commit 1c32d2f

Please sign in to comment.