diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-01-12 06:08:33 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-01-12 06:08:33 +0000 |
commit | b1d5dd0109aaeb46f1a448324236ac4afd50014e (patch) | |
tree | c5ce74999159be05372f47a6cfac9610019fa749 /networking/ping6.c | |
parent | faa73decef96982478f6fb550c1e2ec9dd23c108 (diff) | |
download | busybox-w32-b1d5dd0109aaeb46f1a448324236ac4afd50014e.tar.gz busybox-w32-b1d5dd0109aaeb46f1a448324236ac4afd50014e.tar.bz2 busybox-w32-b1d5dd0109aaeb46f1a448324236ac4afd50014e.zip |
Kiss Gabor noticed that ping compiled without BB_FEATURE_FANCY_PING
would return 0 instead of EXIT_FAILURE when no response was received.
git-svn-id: svn://busybox.net/trunk/busybox@6321 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-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)); |