- follow up patch for UNBLOCK mask

OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=31
This commit is contained in:
Marcus Schaefer 2013-07-23 09:17:26 +00:00 committed by Git OBS Bridge
parent d4673e7ddd
commit e0818bf095
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,29 @@
--- ping.c 2013-07-23 11:15:15.851715020 +0200
+++ ping.c 2013-07-23 11:15:28.075824028 +0200
@@ -103,6 +103,7 @@
static u_short in_cksum(const u_short *addr, int len, u_short salt);
static void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp);
static int parsetos(char *str);
+static void doexit (int);
static struct {
struct cmsghdr cm;
@@ -266,6 +267,8 @@
options |= F_SOURCEROUTE;
}
}
+ set_signal(SIGINT, doexit);
+
while (argc > 0) {
target = *argv;
@@ -1273,3 +1276,9 @@
" [-T tstamp-options] [-Q tos] [hop1 ...] destination\n");
exit(2);
}
+
+static void doexit(int signo)
+{
+ exit (1);
+}
+

View File

@ -43,6 +43,7 @@ Patch3: iputils-ifenslave.diff
Patch6: iputils-s20101006-capabilities.diff
Patch7: iputils-pingtypo.diff
Patch8: iputils-s20101006-sec-ping-unblock.diff
Patch9: iputils-s20101006-ping-interrupt.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: permissions
@ -61,6 +62,7 @@ cp -a %SOURCE1 .
%patch6 -p1
%patch7
%patch8
%patch9
mkdir linux
touch linux/autoconf.h