Skip to content
Snippets Groups Projects
Commit 71e39600 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/fping: upgrade to 3.13

parent 8d97e0fe
No related branches found
No related tags found
No related merge requests found
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fping
pkgver=3.10
pkgrel=3
pkgver=3.13
pkgrel=0
pkgdesc="A utility to ping multiple hosts at once"
url="http://fping.org/"
arch="all"
license="BSD"
depends=""
subpackages="$pkgname-doc"
source="http://fping.org/dist/fping-$pkgver.tar.gz
musl-getaddrinfo-workaround.patch
musl-ipv6-icmp-workaround.patch
"
source="http://fping.org/dist/fping-$pkgver.tar.gz"
options="suid"
_builddir="$srcdir"/$pkgname-$pkgver
......@@ -42,12 +40,6 @@ package() {
chmod 4755 "$pkgdir"/usr/sbin/fping*
}
md5sums="6a0ddecb671df1d580d20c0dd1095773 fping-3.10.tar.gz
7507bc4dca2e0e90137b02d97c032c8e musl-getaddrinfo-workaround.patch
ef31bb9581ea624cdd0913d4f65a6dda musl-ipv6-icmp-workaround.patch"
sha256sums="cd47e842f32fe6aa72369d8a0e3545f7c137bb019e66f47379dc70febad357d8 fping-3.10.tar.gz
dad94189cb843b321755b558550f7a64dcdd7fd45db663dd1a86858568cec815 musl-getaddrinfo-workaround.patch
76c0d27cbdef016590d5d1959652cc89dc3905b1cba0ca3f5a9743382144aa02 musl-ipv6-icmp-workaround.patch"
sha512sums="64bf93c7dbfa2b8adc3344514b2e6e182f1e5950da08b042b8d4d5e4c94b2b8bdc3aaba804339d0461dd88e0efbdfc0bd914a10d22810da8138c9c45335f7047 fping-3.10.tar.gz
487e903dc4c293c109324c739cdc481ff270023acd8c0c0c0aa5953e9e5752f896b3f5aa39bbcf7378a672c2174221fddb503c96deaad1944c1622762331d3c2 musl-getaddrinfo-workaround.patch
cd9aa4e19a6e570cb6cedc6413bbd078a3f5299addaaf9cf83be7c29f1171ca6efc650dd2dd86e61096de595b7e1bd362150cd4269020e822fa1067ca614ced5 musl-ipv6-icmp-workaround.patch"
md5sums="a39134baca6bc6ced56191cb51fb0dc2 fping-3.13.tar.gz"
sha256sums="4bb28efd1cb3d1240ae551dadc20daa852b1ba71bafe32e49ca629c1848e5720 fping-3.13.tar.gz"
sha512sums="d6c1c5b9edb97ef59cfb6d22f74f6a055e52465d3ba0f93be35b6fc9615ee08490ee927f3cf9efd087e18279519292f353abe6152061985ee166ba5f7e95e29d fping-3.13.tar.gz"
--- ./src/fping.c.orig 2015-02-02 10:39:46.413468146 -0100
+++ ./src/fping.c 2015-02-02 10:41:00.654442294 -0100
@@ -2045,7 +2045,9 @@
bzero(&hints, sizeof(struct addrinfo));
hints.ai_flags = 0;
hints.ai_family = AF_INET6;
- hints.ai_socktype = SOCK_RAW;
+ /* setting socket type confuses musl libc and we dont need it for name
+ resolution */
+ // hints.ai_socktype = SOCK_RAW;
hints.ai_protocol = IPPROTO_ICMPV6;
ret_ga = getaddrinfo(name, NULL, &hints, &res);
if (ret_ga) {
--- ./src/socket6.c.orig 2015-02-02 09:46:48.588456281 -0100
+++ ./src/socket6.c 2015-02-02 09:54:59.444873165 -0100
@@ -44,18 +44,18 @@
int open_ping_socket_ipv6()
{
struct protoent *proto;
- int opton = 1;
+ int protonum = 58;
int s;
/* confirm that ICMP is available on this machine */
- if( ( proto = getprotobyname( "ipv6-icmp" ) ) == NULL )
- crash_and_burn( "icmp: unknown protocol" );
+ if( ( proto = getprotobyname( "ipv6-icmp" ) ) != NULL )
+ protonum = proto->p_proto;
/* create raw socket for ICMP calls (ping) */
- s = socket( AF_INET6, SOCK_RAW, proto->p_proto );
+ s = socket( AF_INET6, SOCK_RAW, protonum );
if( s < 0 ) {
- /* try non-privileged icmp (works on Mac OSX without privileges, for example) */
- s = socket( AF_INET6, SOCK_DGRAM, proto->p_proto );
+ /* try non-privileged icmp (works on Ma OSX without privileges, for example) */
+ s = socket( AF_INET6, SOCK_DGRAM, protonum );
if( s < 0 ) {
errno_crash_and_burn( "can't create raw socket (must run as root?)" );
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment