parent
8a3cc24d5a
commit
1ecacb8db5
|
@ -0,0 +1,6 @@
|
||||||
|
case "${ACTION}" in
|
||||||
|
post)
|
||||||
|
setcap CAP_NET_RAW+ep usr/bin/iputils-ping
|
||||||
|
setcap CAP_NET_RAW+ep usr/bin/iputils-ping6
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -1,35 +0,0 @@
|
||||||
From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arjan van de Ven <arjanvandeven@gmail.com>
|
|
||||||
Date: Wed, 16 Jan 2013 03:12:15 +0900
|
|
||||||
Subject: [PATCH [iputils]] ping6: Fix build command line argument with gnutls.
|
|
||||||
|
|
||||||
The ping6 command can use either openssl or gnutls...
|
|
||||||
and the Makefile has a bunch of setup for defining which of the two to use.
|
|
||||||
|
|
||||||
Unfortunately, the final -D define on the commandline to enable gnutls
|
|
||||||
inside the ping6.c file didn't actually make it onto the gcc
|
|
||||||
commandline.
|
|
||||||
This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap.
|
|
||||||
|
|
||||||
Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com>
|
|
||||||
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
|
|
||||||
---
|
|
||||||
Makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index c62d9df..89249f5 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP)
|
|
||||||
DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
|
|
||||||
DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
|
|
||||||
LIB_ping = $(LIB_CAP) $(LIB_IDN)
|
|
||||||
-DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR)
|
|
||||||
+DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
|
|
||||||
LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
|
|
||||||
|
|
||||||
ping: ping_common.o
|
|
||||||
--
|
|
||||||
1.8.0.2
|
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
From 23fcb10ae15a96aa9e5a823cfe0b612d9522691c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mike Frysinger <vapier@gentoo.org>
|
|
||||||
Date: Sat, 14 Aug 2010 01:16:42 -0400
|
|
||||||
Subject: [PATCH [iputils]] tracepath: re-use printf return in print_host
|
|
||||||
|
|
||||||
Since the printf funcs already return the length of chars displayed,
|
|
||||||
use that value instead of re-calculating the length with strlen.
|
|
||||||
|
|
||||||
This also fixes the handling of the strlen return -- it's a size_t,
|
|
||||||
not an int.
|
|
||||||
|
|
||||||
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
||||||
---
|
|
||||||
tracepath.c | 11 ++++-------
|
|
||||||
tracepath6.c | 11 ++++-------
|
|
||||||
2 files changed, 8 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tracepath.c b/tracepath.c
|
|
||||||
index 8a08f1d..f155816 100644
|
|
||||||
--- a/tracepath.c
|
|
||||||
+++ b/tracepath.c
|
|
||||||
@@ -73,13 +73,10 @@ void data_wait(int fd)
|
|
||||||
|
|
||||||
void print_host(const char *a, const char *b, int both)
|
|
||||||
{
|
|
||||||
- int plen = 0;
|
|
||||||
- printf("%s", a);
|
|
||||||
- plen = strlen(a);
|
|
||||||
- if (both) {
|
|
||||||
- printf(" (%s)", b);
|
|
||||||
- plen += strlen(b) + 3;
|
|
||||||
- }
|
|
||||||
+ int plen;
|
|
||||||
+ plen = printf("%s", a);
|
|
||||||
+ if (both)
|
|
||||||
+ plen += printf(" (%s)", b);
|
|
||||||
if (plen >= HOST_COLUMN_SIZE)
|
|
||||||
plen = HOST_COLUMN_SIZE - 1;
|
|
||||||
printf("%*s", HOST_COLUMN_SIZE - plen, "");
|
|
||||||
diff --git a/tracepath6.c b/tracepath6.c
|
|
||||||
index 126fadf..bee95c3 100644
|
|
||||||
--- a/tracepath6.c
|
|
||||||
+++ b/tracepath6.c
|
|
||||||
@@ -86,13 +86,10 @@ void data_wait(int fd)
|
|
||||||
|
|
||||||
void print_host(const char *a, const char *b, int both)
|
|
||||||
{
|
|
||||||
- int plen = 0;
|
|
||||||
- printf("%s", a);
|
|
||||||
- plen = strlen(a);
|
|
||||||
- if (both) {
|
|
||||||
- printf(" (%s)", b);
|
|
||||||
- plen += strlen(b) + 3;
|
|
||||||
- }
|
|
||||||
+ int plen;
|
|
||||||
+ plen = printf("%s", a);
|
|
||||||
+ if (both)
|
|
||||||
+ plen += printf(" (%s)", b);
|
|
||||||
if (plen >= HOST_COLUMN_SIZE)
|
|
||||||
plen = HOST_COLUMN_SIZE - 1;
|
|
||||||
printf("%*s", HOST_COLUMN_SIZE - plen, "");
|
|
||||||
--
|
|
||||||
1.8.0.2
|
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
diff -Naur iputils-s20121221.orig/ping.c iputils-s20121221/ping.c
|
|
||||||
--- iputils-s20121221.orig/ping.c 2013-12-08 13:41:47.077791445 -0800
|
|
||||||
+++ iputils-s20121221/ping.c 2013-12-08 13:43:25.238278205 -0800
|
|
||||||
@@ -654,17 +654,6 @@
|
|
||||||
|
|
||||||
acknowledge(ntohs(icmph.un.echo.sequence));
|
|
||||||
|
|
||||||
- if (!working_recverr) {
|
|
||||||
- struct icmp_filter filt;
|
|
||||||
- working_recverr = 1;
|
|
||||||
- /* OK, it works. Add stronger filter. */
|
|
||||||
- filt.data = ~((1<<ICMP_SOURCE_QUENCH)|
|
|
||||||
- (1<<ICMP_REDIRECT)|
|
|
||||||
- (1<<ICMP_ECHOREPLY));
|
|
||||||
- if (setsockopt(icmp_sock, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)) == -1)
|
|
||||||
- perror("\rWARNING: setsockopt(ICMP_FILTER)");
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
net_errors++;
|
|
||||||
nerrors++;
|
|
||||||
if (options & F_QUIET)
|
|
||||||
@@ -820,19 +809,7 @@
|
|
||||||
icp->type != ICMP_SOURCE_QUENCH);
|
|
||||||
if (error_pkt) {
|
|
||||||
acknowledge(ntohs(icp1->un.echo.sequence));
|
|
||||||
- if (working_recverr) {
|
|
||||||
- return 0;
|
|
||||||
- } else {
|
|
||||||
- static int once;
|
|
||||||
- /* Sigh, IP_RECVERR for raw socket
|
|
||||||
- * was broken until 2.4.9. So, we ignore
|
|
||||||
- * the first error and warn on the second.
|
|
||||||
- */
|
|
||||||
- if (once++ == 1)
|
|
||||||
- fprintf(stderr, "\rWARNING: kernel is not very fresh, upgrade is recommended.\n");
|
|
||||||
- if (once == 1)
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
nerrors+=error_pkt;
|
|
||||||
if (options&F_QUIET)
|
|
|
@ -1,16 +1,17 @@
|
||||||
# Template file for 'iputils'
|
# Template file for 'iputils'
|
||||||
pkgname=iputils
|
pkgname=iputils
|
||||||
version=20121221
|
version=20151218
|
||||||
revision=15
|
revision=1
|
||||||
patch_args="-Np1"
|
patch_args="-Np1"
|
||||||
wrksrc="${pkgname}-s${version}"
|
wrksrc="${pkgname}-s${version}"
|
||||||
makedepends="libressl-devel libcap-devel"
|
makedepends="libressl-devel libcap-devel"
|
||||||
|
depends="libcap-progs"
|
||||||
short_desc="IP Configuration Utilities (and ping)"
|
short_desc="IP Configuration Utilities (and ping)"
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
license="BSD"
|
license="GPL-2, BSD"
|
||||||
homepage="http://www.skbuff.net/iputils"
|
homepage="http://www.skbuff.net/iputils"
|
||||||
distfiles="http://www.skbuff.net/iputils/${pkgname}-s${version}.tar.bz2"
|
distfiles="http://www.skbuff.net/iputils/${pkgname}-s${version}.tar.bz2"
|
||||||
checksum=450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f
|
checksum=549f58d71951e52b46595829134d4e330642f522f50026917fadc349a54825a1
|
||||||
|
|
||||||
alternatives="
|
alternatives="
|
||||||
ping:ping:/usr/bin/${pkgname}-ping
|
ping:ping:/usr/bin/${pkgname}-ping
|
||||||
|
@ -20,13 +21,13 @@ alternatives="
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
make CC="$CC" LD="$LD" CCOPTOPT="$CFLAGS" LDFLAGS="$LDFLAGS" \
|
make CC="$CC" LD="$LD" CCOPTOPT="$CFLAGS" LDFLAGS="$LDFLAGS" \
|
||||||
USE_GNUTLS=no ${makejobs} \
|
USE_GNUTLS=no USE_GCRYPT=no ${makejobs} \
|
||||||
arping clockdiff ping ping6 rdisc tracepath tracepath6
|
arping clockdiff ping ping6 rdisc tracepath tracepath6
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
for f in ping ping6; do
|
for f in ping ping6; do
|
||||||
vinstall ${f} 4755 usr/bin ${pkgname}-${f}
|
vbin ${f} ${pkgname}-${f}
|
||||||
done
|
done
|
||||||
for f in clockdiff arping rdisc tracepath tracepath6; do
|
for f in clockdiff arping rdisc tracepath tracepath6; do
|
||||||
vbin ${f}
|
vbin ${f}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
pattern='iputils-s\K\d+'
|
Loading…
Reference in New Issue