[PATCH] arpping.c: Fixed a TODO by adding an error message print

Martin Lewis martin.lewis.x84 at gmail.com
Tue Aug 6 08:45:15 UTC 2019


Signed-off-by: Martin Lewis <martin.lewis.x84 at gmail.com>
---
 networking/udhcp/arpping.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c
index a395e83..59c2bf8 100644
--- a/networking/udhcp/arpping.c
+++ b/networking/udhcp/arpping.c
@@ -80,8 +80,7 @@ int FAST_FUNC arpping(uint32_t test_nip,
 	memset(&addr, 0, sizeof(addr));
 	safe_strncpy(addr.sa_data, interface, sizeof(addr.sa_data));
 	if (sendto(s, &arp, sizeof(arp), 0, &addr, sizeof(addr)) < 0) {
-		// TODO: error message? caller didn't expect us to fail,
-		// just returning 1 "no reply received" misleads it.
+		bb_perror_msg("can't send arp request on raw socket");
 		goto ret;
 	}
 
-- 
1.9.1



More information about the busybox mailing list