summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2020-08-22 12:36:18 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2020-08-22 12:36:18 +0000
commitb0d2bf5e54574373d019515f975756b241a8419b (patch)
tree9b71e718229eb7443f3b960a67bc4b6b7a9783b4
parentsecurity/nextcloud-end_to_end_encryption: Add new port (diff)
- fix Can't assign requested address
PR: 248647 Approved by: J Harris
-rw-r--r--net/fping/Makefile1
-rw-r--r--net/fping/files/patch-fping.c16
2 files changed, 17 insertions, 0 deletions
diff --git a/net/fping/Makefile b/net/fping/Makefile
index 8c8b0e41b0c3..423249fb3b86 100644
--- a/net/fping/Makefile
+++ b/net/fping/Makefile
@@ -3,6 +3,7 @@
PORTNAME= fping
PORTVERSION= 5.0
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://fping.org/dist/ \
https://github.com/schweikert/${PORTNAME}/releases/download/v${PORTVERSION}/
diff --git a/net/fping/files/patch-fping.c b/net/fping/files/patch-fping.c
new file mode 100644
index 000000000000..054f171fad67
--- /dev/null
+++ b/net/fping/files/patch-fping.c
@@ -0,0 +1,16 @@
+--- src/fping.c.orig 2020-08-05 11:10:13 UTC
++++ src/fping.c
+@@ -1060,11 +1060,11 @@ int main(int argc, char** argv)
+ exit(num_noaddress ? 2 : 1);
+ }
+
+- if (socket4 >= 0) {
++ if (src_addr_set && socket4 >= 0) {
+ socket_set_src_addr_ipv4(socket4, &src_addr, (socktype4 == SOCK_DGRAM) ? &ident4 : NULL);
+ }
+ #ifdef IPV6
+- if (socket6 >= 0) {
++ if (src_addr6_set && socket6 >= 0) {
+ socket_set_src_addr_ipv6(socket6, &src_addr6, (socktype6 == SOCK_DGRAM) ? &ident6 : NULL);
+ }
+ #endif