Accepting request 826692 from home:pevik:branches:network:utilities
- Remove 2 old patches (iputils-sec-ping-unblock.diff, iputils-ping-interrupt.diff) Although not documented, they both belong to bsc#674304. Fix from 2011 was resolved upstream in commit 810dd7f ("ping,ping6: Unmask signals on start-up.") [1], released in s20121112. - Use %autosetup -p1 OBS-URL: https://build.opensuse.org/request/show/826692 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=82
This commit is contained in:
parent
d21237e341
commit
a6e54f9ced
@ -1,43 +0,0 @@
|
|||||||
From 41e442fea26f20ceb815306777d36361575825cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hannes Reinecke <hare@suse.de>
|
|
||||||
Date: Mon, 26 Aug 2013 13:05:01 +0200
|
|
||||||
Subject: Allow ping to be interrupted
|
|
||||||
|
|
||||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
||||||
---
|
|
||||||
ping.c | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/ping.c b/ping.c
|
|
||||||
index 06cc369..2c76677 100644
|
|
||||||
--- a/ping.c
|
|
||||||
+++ b/ping.c
|
|
||||||
@@ -92,6 +92,7 @@ static unsigned short in_cksum(const unsigned short *addr, int len, unsigned sho
|
|
||||||
static void pr_icmph(uint8_t type, uint8_t code, uint32_t info, struct icmphdr *icp);
|
|
||||||
static int parsetos(char *str);
|
|
||||||
static int parseflow(char *str);
|
|
||||||
+static void doexit (int);
|
|
||||||
|
|
||||||
static struct sockaddr_in source = { .sin_family = AF_INET };
|
|
||||||
char *device;
|
|
||||||
@@ -543,6 +544,8 @@ int ping4_run(int argc, char **argv, struct addrinfo *ai, socket_st *sock)
|
|
||||||
options |= F_SOURCEROUTE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ set_signal(SIGINT, doexit);
|
|
||||||
+
|
|
||||||
while (argc > 0) {
|
|
||||||
target = *argv;
|
|
||||||
|
|
||||||
@@ -1619,3 +1622,8 @@ void ping4_install_filter(socket_st *sock)
|
|
||||||
if (setsockopt(sock->fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)))
|
|
||||||
error(0, errno, _("WARNING: failed to install socket filter"));
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+static void doexit(int signo __attribute__((unused)))
|
|
||||||
+{
|
|
||||||
+ exit (1);
|
|
||||||
+}
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
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>
|
|
||||||
---
|
|
||||||
ping.c | 11 +++++++++++
|
|
||||||
1 file changed, 11 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/ping.c b/ping.c
|
|
||||||
index 3debd82..06cc369 100644
|
|
||||||
--- a/ping.c
|
|
||||||
+++ b/ping.c
|
|
||||||
@@ -452,6 +452,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);
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 14 14:18:41 UTC 2020 - Petr Vorel <pvorel@suse.cz>
|
||||||
|
|
||||||
|
- Remove 2 old patches (iputils-sec-ping-unblock.diff, iputils-ping-interrupt.diff)
|
||||||
|
Although not documented, they both belong to bsc#674304. Fix from 2011 was
|
||||||
|
resolved upstream in commit 810dd7f ("ping,ping6: Unmask signals on
|
||||||
|
start-up.") [1], released in s20121112.
|
||||||
|
- Use %autosetup -p1
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jul 12 19:57:40 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>
|
Sun Jul 12 19:57:40 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||||
|
|
||||||
|
@ -25,8 +25,6 @@ Group: Productivity/Networking/Other
|
|||||||
URL: https://github.com/iputils/iputils
|
URL: https://github.com/iputils/iputils
|
||||||
Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz
|
Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz
|
||||||
Source1: rarpd.service
|
Source1: rarpd.service
|
||||||
Patch1: iputils-sec-ping-unblock.diff
|
|
||||||
Patch2: iputils-ping-interrupt.diff
|
|
||||||
Patch3: arping-revert-partially-fix-sent-vs-received-package.patch
|
Patch3: arping-revert-partially-fix-sent-vs-received-package.patch
|
||||||
Patch4: arping-fix-f-quit-on-first-reply-regression.patch
|
Patch4: arping-fix-f-quit-on-first-reply-regression.patch
|
||||||
BuildRequires: docbook5-xsl-stylesheets
|
BuildRequires: docbook5-xsl-stylesheets
|
||||||
@ -64,11 +62,7 @@ address resolution. These packets are sent by hosts at boot time to find
|
|||||||
out their IP addresses.
|
out their IP addresses.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Export CFLAGS so we can also benefit from the ones the Makefile sets for us
|
# Export CFLAGS so we can also benefit from the ones the Makefile sets for us
|
||||||
|
Loading…
x
Reference in New Issue
Block a user