1 Submitted By: Joe Ciccone <jciccone@gmail.com>
3 Initial Package Version: s20100418
4 Upstream Status: Unknown
6 Description: Contains Fixes for Various Issues
8 diff -Naur iputils-s20101006.orig/Makefile iputils-s20101006/Makefile
9 --- iputils-s20101006.orig/Makefile 2010-10-06 07:59:20.000000000 -0400
10 +++ iputils-s20101006/Makefile 2011-01-08 20:06:05.039019429 -0500
12 CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
13 CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
15 -IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
16 +IPV4_TARGETS=tracepath ping rdisc arping clockdiff rarpd
17 IPV6_TARGETS=tracepath6 traceroute6 ping6
18 TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
20 diff -Naur iputils-s20101006.orig/arping.c iputils-s20101006/arping.c
21 --- iputils-s20101006.orig/arping.c 2010-10-06 07:59:20.000000000 -0400
22 +++ iputils-s20101006/arping.c 2011-01-08 20:06:05.039019429 -0500
27 - if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500))
28 + if (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)
31 - if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
32 + if ((!timeout) && (count == 0))
35 + if ( count!=0 && (last.tv_sec==0 || MS_TDIFF(tv,last) > 500 ) ) {
36 send_pack(s, src, dst,
37 (struct sockaddr_ll *)&me, (struct sockaddr_ll *)&he);
40 if (count == 0 && unsolicited)
43 diff -Naur iputils-s20101006.orig/doc/Makefile iputils-s20101006/doc/Makefile
44 --- iputils-s20101006.orig/doc/Makefile 2010-10-06 07:59:20.000000000 -0400
45 +++ iputils-s20101006/doc/Makefile 2011-01-08 20:06:05.039019429 -0500
48 html: $(HTMLFILES) iputils.html
51 +man: $(MANFILES) fix_sgml2man
53 # docbook scripts are incredibly dirty in the sense that they leak
54 # lots of some strange temporary junk directories and files.
56 @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
60 + @sed -i -e 's!\\fB\\fIdestination\\fB\\fR \[\\fB/\\fIport\\fB\\fR\]!\\fB\\fIdestination\\fB\\fR[\\fB/\\fIport\\fB\\fR]!g' tracepath.8
63 @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
65 diff -Naur iputils-s20101006.orig/doc/docbook2man-spec.pl iputils-s20101006/doc/docbook2man-spec.pl
66 --- iputils-s20101006.orig/doc/docbook2man-spec.pl 2010-10-06 07:59:20.000000000 -0400
67 +++ iputils-s20101006/doc/docbook2man-spec.pl 2011-01-08 20:06:05.039019429 -0500
71 if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
80 if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
86 diff -Naur iputils-s20101006.orig/ping.c iputils-s20101006/ping.c
87 --- iputils-s20101006.orig/ping.c 2010-10-06 07:59:20.000000000 -0400
88 +++ iputils-s20101006/ping.c 2011-01-08 20:06:05.039019429 -0500
93 - hp = gethostbyname(target);
94 + hp = gethostbyname2(target, AF_INET);
96 fprintf(stderr, "ping: unknown host %s\n", target);
100 printf("Source Route Failed\n");
102 + case ICMP_NET_UNKNOWN:
103 + printf("Destination Net Unknown\n");
105 + case ICMP_HOST_UNKNOWN:
106 + printf("Destination Host Unknown\n");
108 + case ICMP_HOST_ISOLATED:
109 + printf("Source Host Isolated\n");
112 + printf("Destination Net Prohibited\n");
114 + case ICMP_HOST_ANO:
115 + printf("Destination Host Prohibited\n");
117 + case ICMP_NET_UNR_TOS:
118 + printf("Destination Net Unreachable for Type of Service\n");
120 + case ICMP_HOST_UNR_TOS:
121 + printf("Destination Host Unreachable for Type of Service\n");
123 case ICMP_PKT_FILTERED:
124 printf("Packet filtered\n");
126 + case ICMP_PREC_VIOLATION:
127 + printf("Precedence Violation\n");
129 + case ICMP_PREC_CUTOFF:
130 + printf("Precedence Cutoff\n");
133 printf("Dest Unreachable, Bad Code: %d\n", code);
135 diff -Naur iputils-s20101006.orig/ping_common.c iputils-s20101006/ping_common.c
136 --- iputils-s20101006.orig/ping_common.c 2010-10-06 07:59:20.000000000 -0400
137 +++ iputils-s20101006/ping_common.c 2011-01-08 20:06:05.039019429 -0500
139 printf("%spipe %d", comma, pipesize);
142 - if (ntransmitted > 1 && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
143 + if (ntransmitted > 1 && nreceived &&
144 + (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
145 int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1);
146 printf("%sipg/ewma %d.%03d/%d.%03d ms",
147 comma, ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000);
148 diff -Naur iputils-s20101006.orig/tracepath.c iputils-s20101006/tracepath.c
149 --- iputils-s20101006.orig/tracepath.c 2010-10-06 07:59:20.000000000 -0400
150 +++ iputils-s20101006/tracepath.c 2011-01-08 20:06:05.039019429 -0500
152 base_port = atoi(p+1);
155 - he = gethostbyname(argv[0]);
156 + he = gethostbyname2(argv[0], AF_INET);
158 - herror("gethostbyname");
159 + herror("gethostbyname2");
162 memcpy(&target.sin_addr, he->h_addr, 4);