diff options
author | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-01-26 20:06:48 +0000 |
---|---|---|
committer | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-01-26 20:06:48 +0000 |
commit | fa753f920b64a3f2c50295356e577a7c980c8408 (patch) | |
tree | 77236e83cc0583411a75b752a6152d445eb680e0 /networking | |
parent | 67c5194a104e193ec26bad4013c2a9aa9d73312f (diff) | |
download | busybox-w32-fa753f920b64a3f2c50295356e577a7c980c8408.tar.gz busybox-w32-fa753f920b64a3f2c50295356e577a7c980c8408.tar.bz2 busybox-w32-fa753f920b64a3f2c50295356e577a7c980c8408.zip |
mount and umount could leak loop device allocations causing the system to
quickly run out. Also disable init's SIGHUP handler during shutdown.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@341 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ping.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/networking/ping.c b/networking/ping.c index 92b62def3..2b6e7f5f2 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ping.c,v 1.6 1999/12/11 08:41:28 andersen Exp $ | 2 | * $Id: ping.c,v 1.7 2000/01/26 20:06:48 erik Exp $ |
3 | * Mini ping implementation for busybox | 3 | * Mini ping implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> | 5 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> |
@@ -319,10 +319,11 @@ static void ping(char *host) | |||
319 | int sockopt; | 319 | int sockopt; |
320 | 320 | ||
321 | if (!(proto = getprotobyname("icmp"))) { | 321 | if (!(proto = getprotobyname("icmp"))) { |
322 | fprintf(stderr, "ping: unknown protocol icmp\n"); | 322 | /* getprotobyname failed, so just silently force |
323 | exit(1); | 323 | * proto->p_proto to have the correct value for "icmp" */ |
324 | proto->p_proto = 1; | ||
324 | } | 325 | } |
325 | if ((pingsock = socket(AF_INET, SOCK_RAW, proto->p_proto)) < 0) { | 326 | if ((pingsock = socket(AF_INET, SOCK_RAW, proto->p_proto)) < 0) { /* 1 == ICMP */ |
326 | if (errno == EPERM) { | 327 | if (errno == EPERM) { |
327 | fprintf(stderr, "ping: permission denied. (are you root?)\n"); | 328 | fprintf(stderr, "ping: permission denied. (are you root?)\n"); |
328 | } else { | 329 | } else { |