Don't duplicate error messages on send failure
We have a warn in send_arp_packet, no need to warn again. Also, sleep()
isn't any use here.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
diff --git a/inarp.c b/inarp.c
index 3e8ba2c..6301867 100644
--- a/inarp.c
+++ b/inarp.c
@@ -225,17 +225,13 @@
if (ret)
continue;
- ret = send_arp_packet(fd, ifindex, &inarp_resp,
+ send_arp_packet(fd, ifindex, &inarp_resp,
ARPOP_InREPLY,
inarp_req->dest_mac,
&local_ip,
inarp_req->src_mac,
&inarp_req->src_ip);
- if (ret < 0) {
- warn("Error sending response");
- sleep(1);
- continue;
- }
+
memset(buffer, 0, sizeof(buffer));
}
close(fd);