FreeBSD Bugzilla – Attachment 234386 Details for
Bug 264402
net/fping: Avoid ident collisions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch.txt (text/plain), 1.50 KB, created by
Craig Leres
on 2022-06-02 00:02:03 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Craig Leres
Created:
2022-06-02 00:02:03 UTC
Size:
1.50 KB
patch
obsolete
>diff --git a/net/fping/Makefile b/net/fping/Makefile >index af42b27bf5..1a3c2d858d 100644 >--- a/net/fping/Makefile >+++ b/net/fping/Makefile >@@ -2,7 +2,7 @@ > > PORTNAME= fping > PORTVERSION= 5.0 >-PORTREVISION= 1 >+PORTREVISION= 2 > 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 >index 054f171fad..e8b5343c04 100644 >--- a/net/fping/files/patch-fping.c >+++ b/net/fping/files/patch-fping.c >@@ -14,3 +14,26 @@ > socket_set_src_addr_ipv6(socket6, &src_addr6, (socktype6 == SOCK_DGRAM) ? &ident6 : NULL); > } > #endif >+@@ -2299,6 +2299,22 @@ int wait_for_reply(int64_t wait_time) >+ #endif >+ else { >+ return 1; >++ } >++ >++ /* Check that src address is one of the hosts we pinged before */ >++ int found = 0; >++ for (int i = 0; i < num_hosts; i++) { >++ HOST_ENTRY *h = table[i]; >++ if (!addr_cmp((struct sockaddr*)&response_addr, (struct sockaddr*)&h->saddr)) { >++ found = 1; >++ break; >++ } >++ } >++ if (!found) { >++ // char buf[INET6_ADDRSTRLEN]; >++ // getnameinfo((struct sockaddr*)&response_addr, sizeof(response_addr), buf, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); >++ // fprintf(stderr, "ignoring response from %s\n", buf); >++ return 1; /* packet received, but not from a host we pinged */ >+ } >+ >+ seqmap_value = seqmap_fetch(seq, current_time_ns);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jharris:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 264402
: 234386