diff options
Diffstat (limited to 'networking/arping.c')
-rw-r--r-- | networking/arping.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/networking/arping.c b/networking/arping.c index 915af3261..ab39c717b 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -348,9 +348,10 @@ int arping_main(int argc UNUSED_PARAM, char **argv) if (setsockopt(probe_fd, SOL_SOCKET, SO_DONTROUTE, &const_int_1, sizeof(const_int_1)) == -1) bb_perror_msg("setsockopt(SO_DONTROUTE)"); xconnect(probe_fd, (struct sockaddr *) &saddr, sizeof(saddr)); - if (getsockname(probe_fd, (struct sockaddr *) &saddr, &alen) == -1) { - bb_perror_msg_and_die("getsockname"); - } + getsockname(probe_fd, (struct sockaddr *) &saddr, &alen); + //never happens: + //if (getsockname(probe_fd, (struct sockaddr *) &saddr, &alen) == -1) + // bb_perror_msg_and_die("getsockname"); if (saddr.sin_family != AF_INET) bb_error_msg_and_die("no IP address configured"); src = saddr.sin_addr; @@ -365,10 +366,10 @@ int arping_main(int argc UNUSED_PARAM, char **argv) { socklen_t alen = sizeof(me); - - if (getsockname(sock_fd, (struct sockaddr *) &me, &alen) == -1) { - bb_perror_msg_and_die("getsockname"); - } + getsockname(sock_fd, (struct sockaddr *) &me, &alen); + //never happens: + //if (getsockname(sock_fd, (struct sockaddr *) &me, &alen) == -1) + // bb_perror_msg_and_die("getsockname"); } if (me.sll_halen == 0) { bb_error_msg(err_str, "is not ARPable (no ll address)"); |