forked from pool/iputils
2671b3941c
- Update to version s20161105 (Changes taken from the RELNOTES file) * ping: eliminate deadcode & simplify * ping: do not allow oversized packets to root * correctly initialize first hop * ping: fix ping -6 -I * arping,doc: fix documentation of -I * ping: fix error message when getting EACCES from connect() * renamed INSTALL to INSTALL.md * (re)structured INSTALL.md and transformed into markdown; added hint that installation into prefix has to be done with DESTDIR make variable and that there's no prefix support in configure, close #21 * ping: Silence GCC warnings when building with -fstrict-aliasing * tftpd: Drop supplementary groups for root * libgcrypt: fix static linking * doc: Inserted a missing word * tracepath6: avoid redundant family variable * tracepath: borrow everything good from tracepath6 * tracepath: switch to dual-stack operation * tracepath: remove now redundant tracepath6 * docs: fix parallel build of manpages * ping: remove assignments of values that are never read * docs: remove references to ping6 and traceroute6 * ping: work with older kernels that don't support ping sockets * Revert "ping_common.c: fix message flood when EPERM is encountered in ping" * reorder -I option parsing (boo#1057664) * ping: also bind the ICMP socket to the specific device - tracepath6 is now symlink to tracepath. OBS-URL: https://build.opensuse.org/request/show/522166 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=48
37 lines
1.0 KiB
Diff
37 lines
1.0 KiB
Diff
From bf83678619dd0286f7a66f2ab02763751b0e8ca9 Mon Sep 17 00:00:00 2001
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
Date: Mon, 26 Aug 2013 13:02:36 +0200
|
|
Subject: Block SIGALRM in ping.c
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
ping depends on SIGALRM to exit eventually, so we need to mask
|
|
it with UNBLOCK.
|
|
|
|
Signed-off-by: Marcus Schäfer <ms@suse.de>
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
---
|
|
diff --git a/ping.c b/ping.c
|
|
index cfae0a5..4def349 100644
|
|
--- a/ping.c
|
|
+++ b/ping.c
|
|
@@ -496,6 +496,17 @@ main(int argc, char **argv)
|
|
|
|
/* Create sockets */
|
|
enable_capability_raw();
|
|
+
|
|
+ /*
|
|
+ * ping depend on SIGALARM to exit sometimes,
|
|
+ * but to popen, system, fork carry on parent signal handler
|
|
+ * so we mask it ourself.
|
|
+ */
|
|
+ sigset_t s;
|
|
+ sigaddset(&s, SIGALRM);
|
|
+ sigprocmask(SIG_UNBLOCK, &s, NULL);
|
|
+ set_signal(SIGALRM, doexit);
|
|
+
|
|
if (hints.ai_family != AF_INET6)
|
|
create_socket(&sock4, AF_INET, hints.ai_socktype, IPPROTO_ICMP, hints.ai_family == AF_INET);
|
|
if (hints.ai_family != AF_INET)
|