aboutgitcodebugslistschat
path: root/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'icmp.c')
-rw-r--r--icmp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/icmp.c b/icmp.c
index 88390fb..79f6c8c 100644
--- a/icmp.c
+++ b/icmp.c
@@ -81,8 +81,11 @@ void icmp_sock_handler(const struct ctx *c, int af, union epoll_ref ref)
return;
n = recvfrom(ref.fd, buf, sizeof(buf), 0, &sr.sa, &sl);
- if (n < 0)
+ if (n < 0) {
+ warn("%s: recvfrom() error on ping socket: %s",
+ pname, strerror(errno));
return;
+ }
if (af == AF_INET) {
struct icmphdr *ih4 = (struct icmphdr *)buf;