diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-01-12 06:08:33 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-01-12 06:08:33 +0000 |
commit | 4e486a5d00830990cdfda68eb5dceefab43635f5 (patch) | |
tree | c5ce74999159be05372f47a6cfac9610019fa749 /networking/ping6.c | |
parent | 1dcf218e60849b58b1efa7ce43cf0c4e14f95617 (diff) | |
download | busybox-w32-4e486a5d00830990cdfda68eb5dceefab43635f5.tar.gz busybox-w32-4e486a5d00830990cdfda68eb5dceefab43635f5.tar.bz2 busybox-w32-4e486a5d00830990cdfda68eb5dceefab43635f5.zip |
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.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/networking/ping6.c b/networking/ping6.c index 8e14647eb..f1ccff483 100644 --- a/networking/ping6.c +++ b/networking/ping6.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * $Id: ping6.c,v 1.2 2002/11/26 03:03:41 bug1 Exp $ | 3 | * $Id: ping6.c,v 1.3 2003/01/12 06:08:33 andersen Exp $ |
4 | * Mini ping implementation for busybox | 4 | * Mini ping implementation for busybox |
5 | * | 5 | * |
6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> | 6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> |
@@ -77,6 +77,11 @@ static void ping(const char *host); | |||
77 | 77 | ||
78 | /* simple version */ | 78 | /* simple version */ |
79 | #ifndef CONFIG_FEATURE_FANCY_PING6 | 79 | #ifndef CONFIG_FEATURE_FANCY_PING6 |
80 | void noresp(int ign) | ||
81 | { | ||
82 | printf("No response from %s\n", h->h_name); | ||
83 | exit(EXIT_FAILURE); | ||
84 | } | ||
80 | 85 | ||
81 | static void ping(const char *host) | 86 | static void ping(const char *host) |
82 | { | 87 | { |
@@ -87,12 +92,6 @@ static void ping(const char *host) | |||
87 | int sockopt; | 92 | int sockopt; |
88 | char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; | 93 | char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; |
89 | 94 | ||
90 | void noresp(int ign) | ||
91 | { | ||
92 | printf("No response from %s\n", h->h_name); | ||
93 | exit(0); | ||
94 | } | ||
95 | |||
96 | pingsock = create_icmp6_socket(); | 95 | pingsock = create_icmp6_socket(); |
97 | 96 | ||
98 | memset(&pingaddr, 0, sizeof(struct sockaddr_in)); | 97 | memset(&pingaddr, 0, sizeof(struct sockaddr_in)); |