source: patches/iputils-s20101006-fixes-1.patch@ a518847

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since a518847 was ecc1136, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Updated IPutils to s20101006.

  • Property mode set to 100644
File size: 5.3 KB
RevLine 
[ecc1136]1Submitted By: Joe Ciccone <jciccone@gmail.com>
2Date: 2011-01-08
3Initial Package Version: s20100418
4Upstream Status: Unknown
5Origin: Unknown
6Description: Contains Fixes for Various Issues
7
8diff -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
[8867e46]11@@ -16,7 +16,7 @@
12 CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
13 CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
14
15-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
16+IPV4_TARGETS=tracepath ping arping clockdiff
17 IPV6_TARGETS=tracepath6 traceroute6 ping6
18 TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
19
[ecc1136]20diff -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
[8867e46]23@@ -182,12 +182,17 @@
24 if (start.tv_sec==0)
25 start = tv;
26
27- if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500))
28+ if (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)
29 finish();
30
31- if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
32+ if ((!timeout) && (count == 0))
33+ finish();
34+
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);
38+ if (count >= 0)
39+ count--;
40 if (count == 0 && unsolicited)
41 finish();
42 }
[ecc1136]43diff -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
[8867e46]46@@ -6,7 +6,7 @@
47
48 html: $(HTMLFILES) iputils.html
49
50-man: $(MANFILES)
51+man: $(MANFILES) fix_sgml2man
52
53 # docbook scripts are incredibly dirty in the sense that they leak
54 # lots of some strange temporary junk directories and files.
55@@ -33,6 +33,9 @@
56 @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
57 @-rm -rf tmp.db2man
58
59+fix_sgml2man:
60+ @sed -i -e 's!\\fB\\fIdestination\\fB\\fR \[\\fB/\\fIport\\fB\\fR\]!\\fB\\fIdestination\\fB\\fR[\\fB/\\fIport\\fB\\fR]!g' tracepath.8
61+
62 clean:
63 @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
64
[ecc1136]65diff -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
[8867e46]68@@ -428,7 +428,7 @@
69 output ' ';
70
71 if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
72- output '[ ';
73+ output '[';
74 }
75 bold_on();
76 }
77@@ -441,7 +441,7 @@
78 font_off();
79 }
80 if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
81- output '] ';
82+ output ']';
83 }
84 }
85
[ecc1136]86diff -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
[8867e46]89@@ -250,7 +250,7 @@
90 if (argc == 1)
91 options |= F_NUMERIC;
92 } else {
93- hp = gethostbyname(target);
94+ hp = gethostbyname2(target, AF_INET);
95 if (!hp) {
96 fprintf(stderr, "ping: unknown host %s\n", target);
97 exit(2);
98@@ -883,9 +883,36 @@
99 case ICMP_SR_FAILED:
100 printf("Source Route Failed\n");
101 break;
102+ case ICMP_NET_UNKNOWN:
103+ printf("Destination Net Unknown\n");
104+ break;
105+ case ICMP_HOST_UNKNOWN:
106+ printf("Destination Host Unknown\n");
107+ break;
108+ case ICMP_HOST_ISOLATED:
109+ printf("Source Host Isolated\n");
110+ break;
111+ case ICMP_NET_ANO:
112+ printf("Destination Net Prohibited\n");
113+ break;
114+ case ICMP_HOST_ANO:
115+ printf("Destination Host Prohibited\n");
116+ break;
117+ case ICMP_NET_UNR_TOS:
118+ printf("Destination Net Unreachable for Type of Service\n");
119+ break;
120+ case ICMP_HOST_UNR_TOS:
121+ printf("Destination Host Unreachable for Type of Service\n");
122+ break;
123 case ICMP_PKT_FILTERED:
124 printf("Packet filtered\n");
125 break;
126+ case ICMP_PREC_VIOLATION:
127+ printf("Precedence Violation\n");
128+ break;
129+ case ICMP_PREC_CUTOFF:
130+ printf("Precedence Cutoff\n");
131+ break;
132 default:
133 printf("Dest Unreachable, Bad Code: %d\n", code);
134 break;
[ecc1136]135diff -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
[8867e46]138@@ -872,7 +872,8 @@
139 printf("%spipe %d", comma, pipesize);
140 comma = ", ";
141 }
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);
[ecc1136]148diff -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
[8867e46]151@@ -338,9 +338,9 @@
152 base_port = atoi(p+1);
153 } else
154 base_port = 44444;
155- he = gethostbyname(argv[0]);
156+ he = gethostbyname2(argv[0], AF_INET);
157 if (he == NULL) {
158- herror("gethostbyname");
159+ herror("gethostbyname2");
160 exit(1);
161 }
162 memcpy(&target.sin_addr, he->h_addr, 4);
Note: See TracBrowser for help on using the repository browser.