From: Arkadiusz Miśkiewicz Date: Wed, 10 Dec 2014 07:18:10 +0000 (+0100) Subject: - up to 0.86 X-Git-Tag: auto/th/mtr-0.86-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=e2b2650ef8899ea67338524fcded26c652570221;p=packages%2Fmtr.git - up to 0.86 --- diff --git a/mtr-git.patch b/mtr-git.patch deleted file mode 100644 index 4a2db87..0000000 --- a/mtr-git.patch +++ /dev/null @@ -1,110 +0,0 @@ -commit 12c53f98e44598b87d3f2308e0d892f49d7af8e4 -Author: Roger Wolff -Date: Tue Jul 16 13:59:52 2013 +0200 - - Fix bombout with ipv6 enabled binary on ipv4 only system. - -diff --git a/dns.c b/dns.c -index 371934f..221665d 100644 ---- a/dns.c -+++ b/dns.c -@@ -529,10 +529,12 @@ void dns_open(void) - #ifdef ENABLE_IPV6 - resfd6 = socket(AF_INET6, SOCK_DGRAM, 0); - if (resfd6 == -1) { -+ // consider making removing this warning. For now leave it in to see -+ // new code activated. -- REW - fprintf(stderr, - "Unable to allocate IPv6 socket for nameserver communication: %s\n", - strerror(errno)); -- exit(-1); -+ // exit(-1); - } - #endif - option = 1; -@@ -543,11 +545,13 @@ void dns_open(void) - exit(-1); - } - #ifdef ENABLE_IPV6 -- if (setsockopt(resfd6,SOL_SOCKET,SO_BROADCAST,(char *)&option,sizeof(option))) { -- fprintf(stderr, -- "Unable to setsockopt() on IPv6 nameserver communication socket: %s\n", -- strerror(errno)); -- exit(-1); -+ if (resfd6 > 0) { -+ if (setsockopt(resfd6,SOL_SOCKET,SO_BROADCAST,(char *)&option,sizeof(option))) { -+ fprintf(stderr, -+ "Unable to setsockopt() on IPv6 nameserver communication socket: %s\n", -+ strerror(errno)); -+ exit(-1); -+ } - } - #endif - longipstr( "127.0.0.1", &localhost, AF_INET ); -@@ -933,12 +937,14 @@ void dorequest(char *s,int type,word id) - hp = (packetheader *)buf; - hp->id = id; /* htons() deliberately left out (redundant) */ - #ifdef ENABLE_IPV6 -- for (i = 0;i < NSCOUNT6;i++) { -- if (!NSSOCKADDR6(i)) -- continue; -- if (NSSOCKADDR6(i)->sin6_family == AF_INET6) -- (void)sendto(resfd6,buf,r,0,(struct sockaddr *) NSSOCKADDR6(i), -- sizeof(struct sockaddr_in6)); -+ if (resfd6 > 0) { -+ for (i = 0;i < NSCOUNT6;i++) { -+ if (!NSSOCKADDR6(i)) -+ continue; -+ if (NSSOCKADDR6(i)->sin6_family == AF_INET6) -+ (void)sendto(resfd6,buf,r,0,(struct sockaddr *) NSSOCKADDR6(i), -+ sizeof(struct sockaddr_in6)); -+ } - } - #endif - for (i = 0;i < myres.nscount;i++) -@@ -1327,6 +1333,9 @@ void dns_ack6(void) - int r,i; - static char addrstr[INET6_ADDRSTRLEN]; - -+ // Probably not necessary. -- REW -+ if (resfd6 < 0) return; -+ - r = recvfrom(resfd6,(byte *)resrecvbuf,MaxPacketsize,0, - from, &fromlen); - if (r > 0) { -diff --git a/gtk.c b/gtk.c -index d00f769..38ed507 100644 ---- a/gtk.c -+++ b/gtk.c -@@ -615,8 +615,10 @@ void gtk_loop(void) - net_iochannel = g_io_channel_unix_new(net_waitfd()); - g_io_add_watch(net_iochannel, G_IO_IN, gtk_net_data, NULL); - #ifdef ENABLE_IPV6 -- dns_iochannel = g_io_channel_unix_new(dns_waitfd6()); -- g_io_add_watch(dns_iochannel, G_IO_IN, gtk_dns_data6, NULL); -+ if (dns_waitfd6() > 0) { -+ dns_iochannel = g_io_channel_unix_new(dns_waitfd6()); -+ g_io_add_watch(dns_iochannel, G_IO_IN, gtk_dns_data6, NULL); -+ } - #endif - dns_iochannel = g_io_channel_unix_new(dns_waitfd()); - g_io_add_watch(dns_iochannel, G_IO_IN, gtk_dns_data, NULL); -diff --git a/select.c b/select.c -index 0545d9f..e7c397e 100644 ---- a/select.c -+++ b/select.c -@@ -80,8 +80,12 @@ void select_loop(void) { - #ifdef ENABLE_IPV6 - if (dns) { - dnsfd6 = dns_waitfd6(); -- FD_SET(dnsfd6, &readfd); -- if(dnsfd6 >= maxfd) maxfd = dnsfd6 + 1; -+ if (dnsfd6 >= 0) { -+ FD_SET(dnsfd6, &readfd); -+ if(dnsfd6 >= maxfd) maxfd = dnsfd6 + 1; -+ } else { -+ dnsfd6 = 0; -+ } - } else - dnsfd6 = 0; - #endif diff --git a/mtr-usage_first_max_hop.patch b/mtr-usage_first_max_hop.patch deleted file mode 100644 index 696e78f..0000000 --- a/mtr-usage_first_max_hop.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- mtr.c~ 2013-07-10 14:54:59.000000000 +0200 -+++ mtr.c 2013-07-10 14:55:33.519595585 +0200 -@@ -579,6 +579,7 @@ int main(int argc, char **argv) - #endif - "\t\t[--psize=bytes/-s bytes]\n" /* ok */ - "\t\t[--report-wide|-w] [-u|-T] [--port=PORT] [--timeout=SECONDS]\n" /* rew */ -+ "\t\t[-f FIRSTHOP] [-m MAXHOP]\n" /* first and max hop */ - "\t\t[--interval=SECONDS] HOSTNAME\n", argv[0]); - exit(0); - } diff --git a/mtr.spec b/mtr.spec index 03581ef..1366774 100644 --- a/mtr.spec +++ b/mtr.spec @@ -9,20 +9,20 @@ Summary(pt_BR.UTF-8): Ferramenta para diagnóstico da rede, combinando ping/trac Summary(ru.UTF-8): Matt's Traceroute - утилита для диагностики сети Summary(uk.UTF-8): Matt's Traceroute - утиліта для діагностики мережі Name: mtr -Version: 0.85 -Release: 2 +Version: 0.86 +Release: 1 Epoch: 1 License: GPL v2 Group: Networking/Utilities -Source0: ftp://ftp.bitwizard.nl/mtr/%{name}-%{version}.tar.gz -# Source0-md5: aba1e111d270178eb1d65e51ebf6503f +Source0: https://github.com/traviscross/mtr/archive/v%{version}.tar.gz +# Source0-md5: fa1edf3015d5146790de260adaa5071c Source1: %{name}.desktop Source2: %{name}.png Patch0: %{name}-Makefile.patch -Patch1: %{name}-git.patch + Patch2: %{name}-mtr6.patch Patch3: %{name}-display.patch -Patch4: %{name}-usage_first_max_hop.patch + Patch5: %{name}-noraw.patch Patch6: %{name}-nox.patch URL: http://www.bitwizard.nl/mtr/ @@ -138,10 +138,10 @@ mtr - це traceroute та ping в одному флаконі. При запу %prep %setup -q %patch0 -p1 -%patch1 -p1 + %patch2 -p1 %patch3 -p1 -%patch4 -p0 + %patch5 -p1 %patch6 -p1