diff --git a/iftop-1.0-dns-resolution.patch b/iftop-1.0-dns-resolution.patch new file mode 100644 index 0000000..ad37a2a --- /dev/null +++ b/iftop-1.0-dns-resolution.patch @@ -0,0 +1,42 @@ +commit 35af3cf65f17961d173b31fd3b00166ec095c226 +Author: Paul Warren +Date: Mon Feb 6 21:35:37 2017 +0000 + + Fix bug with DNS resolution. https://bugzilla.redhat.com/show_bug.cgi?id=1120254 + +diff --git a/resolver.c b/resolver.c +index adddbc1..a3123bd 100644 +--- a/resolver.c ++++ b/resolver.c +@@ -438,11 +438,11 @@ void resolver_worker(void* ptr) { + char **ch_pp; + void **void_pp; + } u_old = { &old }; +- if(hash_find(ns_hash, &addr, u_old.void_pp) == HASH_STATUS_OK) { ++ if(hash_find(ns_hash, &addr.as_addr6, u_old.void_pp) == HASH_STATUS_OK) { + hash_delete(ns_hash, &addr); + xfree(old); + } +- hash_insert(ns_hash, &addr, (void*)hostname); ++ hash_insert(ns_hash, &addr.as_addr6, (void*)hostname); + } + + } +@@ -488,7 +488,7 @@ void resolve(int af, void* addr, char* result, int buflen) { + + pthread_mutex_lock(&resolver_queue_mutex); + +- if(hash_find(ns_hash, raddr, u_hostname.void_pp) == HASH_STATUS_OK) { ++ if(hash_find(ns_hash, &raddr->as_addr6, u_hostname.void_pp) == HASH_STATUS_OK) { + /* Found => already resolved, or on the queue, no need to keep + * it around */ + free(raddr); +@@ -497,7 +497,7 @@ void resolve(int af, void* addr, char* result, int buflen) { + hostname = xmalloc(INET6_ADDRSTRLEN); + inet_ntop(af, &raddr->addr, hostname, INET6_ADDRSTRLEN); + +- hash_insert(ns_hash, raddr, hostname); ++ hash_insert(ns_hash, &raddr->as_addr6, hostname); + + if(((head + 1) % RESOLVE_QUEUE_LENGTH) == tail) { + /* queue full */ diff --git a/iftop.spec b/iftop.spec index b7e64b6..aedde19 100644 --- a/iftop.spec +++ b/iftop.spec @@ -1,13 +1,14 @@ Summary: Command line tool that displays bandwidth usage on an interface Name: iftop Version: 1.0 -Release: 0.13.pre4%{?dist} +Release: 0.14.pre4%{?dist} License: GPLv2+ Group: Applications/Internet URL: http://www.ex-parrot.com/~pdw/%{name}/ Source: http://www.ex-parrot.com/~pdw/%{name}/download/%{name}-%{version}pre4.tar.gz Patch0: iftop-1.0-ncursesw.patch Patch1: iftop-1.0-mac-address.patch +Patch2: iftop-1.0-dns-resolution.patch BuildRequires: ncurses-devel, %{_includedir}/pcap.h BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -43,6 +44,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/%{name}.* %changelog +* Tue Mar 21 2017 Robert Scheck 1.0-0.14.pre4 +- Added patch from upstream to fix DNS resolution (#1120254, #1309755) + * Fri Feb 10 2017 Fedora Release Engineering - 1.0-0.13.pre4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index d5b5d10..d9995e2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7e6decb4958e8a4890cccac335239f24 iftop-1.0pre4.tar.gz +SHA512 (iftop-1.0pre4.tar.gz) = abd74e8025bb82fef9ebab4997b1d018201a523d47c0128128ca37797490046538d74758dc4471735c22b890e5bd238ad6b2a30776d465138ede367cdd263d22