summaryrefslogtreecommitdiff
path: root/networking/ping6.c
diff options
context:
space:
mode:
authorEric Andersen2003-01-12 06:08:33 +0000
committerEric Andersen2003-01-12 06:08:33 +0000
commit4e486a5d00830990cdfda68eb5dceefab43635f5 (patch)
treec5ce74999159be05372f47a6cfac9610019fa749 /networking/ping6.c
parent1dcf218e60849b58b1efa7ce43cf0c4e14f95617 (diff)
downloadbusybox-4e486a5d00830990cdfda68eb5dceefab43635f5.zip
busybox-4e486a5d00830990cdfda68eb5dceefab43635f5.tar.gz
Kiss Gabor noticed that ping compiled without BB_FEATURE_FANCY_PING
would return 0 instead of EXIT_FAILURE when no response was received.
Diffstat (limited to 'networking/ping6.c')
-rw-r--r--networking/ping6.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/networking/ping6.c b/networking/ping6.c
index 8e14647..f1ccff4 100644
--- a/networking/ping6.c
+++ b/networking/ping6.c
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
- * $Id: ping6.c,v 1.2 2002/11/26 03:03:41 bug1 Exp $
+ * $Id: ping6.c,v 1.3 2003/01/12 06:08:33 andersen Exp $
* Mini ping implementation for busybox
*
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -77,6 +77,11 @@ static void ping(const char *host);
/* simple version */
#ifndef CONFIG_FEATURE_FANCY_PING6
+void noresp(int ign)
+{
+ printf("No response from %s\n", h->h_name);
+ exit(EXIT_FAILURE);
+}
static void ping(const char *host)
{
@@ -87,12 +92,6 @@ static void ping(const char *host)
int sockopt;
char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];
- void noresp(int ign)
- {
- printf("No response from %s\n", h->h_name);
- exit(0);
- }
-
pingsock = create_icmp6_socket();
memset(&pingaddr, 0, sizeof(struct sockaddr_in));