Skip to content

When pinging localhost, we need to reread until we receive the ECHO REPLY #2

@erriapo

Description

@erriapo

Currently the listener is also receiving our own ECHO REQUESTS.

gavin@frodo:~/dev-2017/goping$ bin/goping -d localhost -v
.Reverse lookup took 130.09303ms

Reversed lookup of supplied host = localhost
PING 127.0.0.1 (localhost) 56(64) bytes of data.
64 bytes from (127.0.0.1): icmp_req=1 time=266.056µs
	%!s(int64=266056) ns
2017/07/30 21:08:48 	&{Type:echo Code:0 Checksum:30923 Body:0x18877ec0}; echo
64 bytes from (127.0.0.1): icmp_req=2 time=316.161µs
	%!s(int64=316161) ns
Push 0.316161
2017/07/30 21:08:49 	&{Type:echo reply Code:0 Checksum:32971 Body:0x188ae040}; echo reply
64 bytes from (127.0.0.1): icmp_req=3 time=235.781µs
	%!s(int64=235781) ns
2017/07/30 21:08:50 	&{Type:echo Code:0 Checksum:30923 Body:0x188ae120}; echo
64 bytes from (127.0.0.1): icmp_req=4 time=331.646µs
	%!s(int64=331646) ns
Push 0.331646
2017/07/30 21:08:51 	&{Type:echo reply Code:0 Checksum:32971 Body:0x188ae1e0}; echo reply
64 bytes from (127.0.0.1): icmp_req=5 time=176.016µs
	%!s(int64=176016) ns
2017/07/30 21:08:52 	&{Type:echo Code:0 Checksum:30923 Body:0x188b6040}; echo

--- localhost ping statistics ---
5 packets transmitted, 2 received, 60% packet loss
rtt min/avg/max/mdev = 0.316/0.324/0.332/0.011 ms

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions