updated iproute2 to 2.6.23 + latest debian patches + latest esfq. deleted patches...
[openwrt/svn-archive/archive.git] / package / iproute2 / patches / 000-debian_patches_3.patch
1 --- iproute-20071016.orig/doc/ip-cref.tex
2 +++ iproute-20071016/doc/ip-cref.tex
3 @@ -1322,6 +1322,19 @@
4 If it is not given, Linux uses the value selected with \verb|sysctl|
5 variable \verb|net/ipv4/tcp_reordering|.
6
7 +\item \verb|hoplimit NUMBER|
8 +
9 +--- [2.5.74+ only] Hop limit on the path to this destination. If it is not
10 + given, Linux uses the value selected with \verb|sysctl| variable
11 + \verb|net/ipv4/ip_default_ttl|.
12 +
13 +\item \verb|initcwnd NUMBER|
14 +
15 +--- [2.5.70+ only] Initial congestion window size when establishing
16 + connections to this destination. This value is multiplied with the
17 + MSS (``Maximal Segment Size'') for the connection to get the actual
18 + window size. If it is not given (or set to zero), Linux uses the
19 + values specified in~\cite{RFC2414}.
20
21
22 \item \verb|nexthop NEXTHOP|
23 @@ -2651,6 +2664,9 @@
24 \bibitem{RFC-DHCP} R.~Droms.
25 ``Dynamic Host Configuration Protocol.'', RFC-2131
26
27 +\bibitem{RFC2414} M.~Allman, S.~Floyd, C.~Partridge.
28 +``Increasing TCP's Initial Window'', RFC-2414.
29 +
30 \end{thebibliography}
31
32
33 --- iproute-20071016.orig/doc/Makefile
34 +++ iproute-20071016/doc/Makefile
35 @@ -14,6 +14,7 @@
36 PAGESPERPAGE=2
37
38 HTMLFILES=$(subst .sgml,.html,$(shell echo *.sgml))
39 +TXTFILES=$(subst .sgml,.txt,$(shell echo *.sgml))
40 DVIFILES=$(subst .ps,.dvi,$(PSFILES))
41
42
43 @@ -25,6 +26,8 @@
44
45 dvi: $(DVIFILES)
46
47 +txt: $(TXTFILES)
48 +
49 print: $(PSFILES)
50 $(LPR) $(PSFILES)
51
52 @@ -47,9 +50,13 @@
53 %.html: %.sgml
54 $(SGML2HTML) $<
55
56 +%.txt: %.html
57 + lynx -nolist -dump $< > $@
58 +
59 +
60 install:
61 install -m 0644 $(shell echo *.tex) $(DESTDIR)$(DOCDIR)
62 install -m 0644 $(shell echo *.sgml) $(DESTDIR)$(DOCDIR)
63
64 clean:
65 - rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html
66 + rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html $(TXTFILES)
67 --- iproute-20071016.orig/misc/Makefile
68 +++ iproute-20071016/misc/Makefile
69 @@ -1,7 +1,8 @@
70 SSOBJ=ss.o ssfilter.o
71 LNSTATOBJ=lnstat.o lnstat_util.o
72
73 -TARGETS=ss nstat ifstat rtacct arpd lnstat
74 +#TARGETS=ss nstat ifstat rtacct arpd lnstat
75 +TARGETS=ss nstat rtacct lnstat arpd
76
77 include ../Config
78
79 --- iproute-20071016.orig/lib/utils.c
80 +++ iproute-20071016/lib/utils.c
81 @@ -47,6 +47,48 @@
82 return 0;
83 }
84
85 +/* a valid netmask must be 2^n - 1 */
86 +static int is_valid_netmask(const inet_prefix *addr)
87 +{
88 + uint32_t host;
89 +
90 + if (addr->family != AF_INET)
91 + return 0;
92 +
93 + host = ~ntohl(addr->data[0]);
94 +
95 + return (host & (host + 1)) == 0;
96 +}
97 +
98 +static unsigned cidr(const inet_prefix *addr)
99 +{
100 + unsigned bits = 0;
101 + u_int32_t mask;
102 +
103 + for (mask = ntohl(addr->data[0]); mask; mask <<= 1)
104 + ++bits;
105 +
106 + return bits;
107 +}
108 +
109 +static int get_netmask(unsigned *val, const char *arg, int base)
110 +{
111 + inet_prefix addr;
112 +
113 + if (!get_unsigned(val, arg, base))
114 + return 0;
115 +
116 + /* try coverting dotted quad to CIDR */
117 + if (!get_addr_1(&addr, arg, AF_INET)) {
118 + if (is_valid_netmask(&addr))
119 + return 0;
120 +
121 + *val = cidr(&addr);
122 + }
123 +
124 + return -1;
125 +}
126 +
127 int get_unsigned(unsigned *val, const char *arg, int base)
128 {
129 unsigned long res;
130 @@ -304,7 +346,8 @@
131 dst->bitlen = 32;
132 }
133 if (slash) {
134 - if (get_unsigned(&plen, slash+1, 0) || plen > dst->bitlen) {
135 + if (get_netmask(&plen, slash+1, 0)
136 + || plen > dst->bitlen) {
137 err = -1;
138 goto done;
139 }
140 @@ -642,9 +685,9 @@
141 int cmdlineno;
142
143 /* Like glibc getline but handle continuation lines and comments */
144 -size_t getcmdline(char **linep, size_t *lenp, FILE *in)
145 +ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
146 {
147 - size_t cc;
148 + ssize_t cc;
149 char *cp;
150
151 if ((cc = getline(linep, lenp, in)) < 0)
152 @@ -672,9 +715,11 @@
153 if (cp)
154 *cp = '\0';
155
156 - *linep = realloc(*linep, strlen(*linep) + strlen(line1) + 1);
157 + *lenp = strlen(*linep) + strlen(line1) + 1;
158 + *linep = realloc(*linep, *lenp);
159 if (!*linep) {
160 fprintf(stderr, "Out of memory\n");
161 + *lenp = 0;
162 return -1;
163 }
164 cc += cc1 - 2;
165 --- iproute-20071016.orig/include/utils.h
166 +++ iproute-20071016/include/utils.h
167 @@ -144,7 +144,7 @@
168 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
169
170 extern int cmdlineno;
171 -extern size_t getcmdline(char **line, size_t *len, FILE *in);
172 +extern ssize_t getcmdline(char **line, size_t *len, FILE *in);
173 extern int makeargs(char *line, char *argv[], int maxargs);
174
175 #endif /* __UTILS_H__ */
176 --- iproute-20071016.orig/tc/m_police.c
177 +++ iproute-20071016/tc/m_police.c
178 @@ -37,7 +37,7 @@
179 fprintf(stderr, "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n");
180 fprintf(stderr, " [ peakrate BPS ] [ avrate BPS ]\n");
181 fprintf(stderr, " [ ACTIONTERM ]\n");
182 - fprintf(stderr, "Old Syntax ACTIONTERM := <EXCEEDACT>[/NOTEXCEEDACT] \n");
183 + fprintf(stderr, "Old Syntax ACTIONTERM := action <EXCEEDACT>[/NOTEXCEEDACT] \n");
184 fprintf(stderr, "New Syntax ACTIONTERM := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT] \n");
185 fprintf(stderr, "Where: *EXCEEDACT := pipe | ok | reclassify | drop | continue \n");
186 fprintf(stderr, "Where: pipe is only valid for new syntax \n");
187 @@ -237,8 +237,7 @@
188 } else if (strcmp(*argv, "help") == 0) {
189 usage();
190 } else {
191 - fprintf(stderr, "What is \"%s\"?\n", *argv);
192 - return -1;
193 + break;
194 }
195 ok++;
196 argc--; argv++;
197 --- iproute-20071016.orig/debian/doc/htb/htbfaq.htm
198 +++ iproute-20071016/debian/doc/htb/htbfaq.htm
199 @@ -0,0 +1,141 @@
200 +<html><head><title>HTB FAQ</title></head>
201 +<body>
202 +<h1><center>HTB FAQ</center></h1>
203 +<center><address>
204 +Martin Devera aka devik (devik@cdi.cz)<br>
205 +Last updated: 7.7.2003
206 +</address></center>
207 +<br>
208 +<b>How to set single HTB up for more interfaces or for incoming packets</b>
209 +<p>
210 +You need IMQ for this because all qdisc can handle only outgoing
211 +traffic on single interface. See
212 +<a href="http://www.linuximq.net/">http://www.linuximq.net/</a>.
213 +<p>
214 +<b>When HTB is used on machine with Apache (FTP, Samba, ...) server running
215 + then downloading from it can't be limited precisely</b>
216 +<p>
217 +Try to add PFIFO with limit 10 under HTB classes. When you use default
218 +(much larger PFIFO) or SFQ then TCP stack will back off itself as it
219 +see too large memory used for outgoing packets. You can also play
220 +with /proc/sys/net/ipv4/tcp_wmem.
221 +<p>
222 +<b>"HTB: mindelay=500, report it please !" messages in syslog</b>
223 +<p>
224 +This means that all indicated that some class should be ready
225 +soon but when we looked for it we haven't found one which will
226 +be ready in 5 seconds.
227 +<br>
228 +After this message you can see lines like
229 +<pre>
230 +kernel: htb*g j=154480191
231 +kernel: htb*r7 m=0
232 +kernel: htb*r6 m=0
233 +kernel: htb*r5 m=0
234 +kernel: htb*r4 m=0
235 +kernel: htb*r3 m=0
236 +kernel: htb*r2 m=0
237 +kernel: htb*r1 m=0
238 +kernel: htb*r0 m=0
239 +kernel: htb*c20110 m=2 t=636487 c=17888 pq=0 df=483328 ql=0 pa=0 f:
240 +kernel: htb*c20220 m=1 t=-59999999 c=42404 pq=154487461 df=450560 ql=14 pa=40 f:
241 +kernel: htb*c20001 m=2 t=5131 c=6439 pq=0 df=8192 ql=0 pa=0 f:
242 +</pre>
243 +If you decide to treat is as real bug then I'll need all of these. They
244 +are logged under kernel.debug facility so often you need to add it so
245 +your syslog.conf. These "htb*" are dump of internal state of all classes.
246 +c20110 means class 2:110. *r lines are states of row activity bitsmasks.
247 +*c indicates stet of all classes. You are interested in classes
248 +with m=1 resp. m=0. These will become ready after time -c resp. -t whatever
249 +is negative and smaller.
250 +It is 59999999 us for class 2:110 above which is 59sec. It is way too much
251 +and HTB will spill that error because it is &gt; 5 sec.
252 +<p>
253 +<i>So what is the problem ?</i> Probably you have too small rate or ceil
254 +for such class - you should use at least 4kbit for realiable operation
255 +of HTB - it leads to max 3sec of delay for 1500 byte packets which seems
256 +as reasonable value.
257 +<br>
258 +Also try <a href=v3/htb_3.7_delay_bug.patch>this</a> patch against 2.4.20.
259 +(works against older too with one reject). It increases timeout to
260 +10secs and makes errors more readable.
261 +<i>I'm interested in your experiences (good or bad) with the patch !</i>
262 +<br>
263 +If you think it is not the case and you still get weird errors, contact
264 +me with syslog data above and output of commands
265 +<pre>
266 +tc -s -d qdisc
267 +tc -s -d class show dev your_htb_device1_here
268 +tc -s -d class show dev your_htb_device2_here
269 +...
270 +</pre>
271 +
272 +<p>
273 +<b>Why HTB sharing setup works with eth0 but on lo (loopback)
274 + it exhibits weird rates ?
275 +</b>
276 +<p>Try to execute
277 +<pre>
278 +ifconfig lo mtu 1500
279 +</pre>
280 +or use parameter mtu 16400 on "tc qdisc add" line. It is because
281 +HTB reserves rate table for 1500 bytes long packets and loopback
282 +uses 16384 as default.
283 +<p>
284 +<b>What's difference between kbps and kbit ?
285 +</b>
286 +<p>
287 +1kbps=8kbit. Don't forget it !
288 +<p>
289 +<b>What if sum of child rates is smaller than parent rate ?
290 +</b>
291 +<p>
292 +It is like if you create unused child with remaining rate - the
293 +rate difference is divided between other children.
294 +<p>
295 +<b>What if sum of child rates is greater than parent rate ?
296 +</b>
297 +<p>
298 +Then interesting things can happen. Total rate delivered
299 +by children can be higher that parent's rate (thus its rate
300 +is not respected). However when sum of actual child rates are
301 +under parent's rate then borrowing will occur like in regular case.
302 +<p>
303 +I use setup with 4 classes, parent has rate=ceil=6kbps, child
304 +"mail" has rate=1kbps ceil=4kbps, "web" has rate=ceil=15kbps
305 +and "other" has rate=2kbps ceil=4kbps.
306 +HTB is attached to an PPP interface with compressed multilink pair
307 +of modems which can go from 6kbps to cca 16kbps (depends on compresability
308 +of data). When "web" traffic is present it can go as high as compression
309 +allows while still allowing mail 1kbps and other 2kbps.
310 +<br>
311 +When "web" traffic is smaller than 6kbps then "mail" and "other"
312 +can borrow more bw up to 4k each.
313 +Parent's class it not set to 18k because then "mail" and "other"
314 +could get as much as 8k which is more that link's minimum and
315 +would saturate the link. Thus I set parent to 6k so that
316 +"mail"+"other" are limited to 6k while "web" can go over.
317 +<p>
318 +You can do similar setup by using one more class and deeper hierarchy
319 +but this is just to show you the possibility.
320 +<p>
321 +<b>"RTNETLINK answers: Invalid argument" and tc parameters are correct
322 +</b>
323 +<p>
324 +Probably you use tc tool not suited for HTB in kernel. Reread
325 +main HTB page section Downloads.
326 +<p>
327 +<b>All packets are dropped when "default" is set to nonleaf
328 +</b>
329 +<p>
330 +Yes. Default kwyword must point to leaf or be 0 (so unclassified
331 +packets go thru directly). If you want to "direct" other packets
332 +to non-leaf do it by catch all filter with the largest "pref".
333 +<p>
334 +<b>What tool was used to create graphs in HTB manual ?
335 +</b>
336 +<p>
337 +It is proprietary tool called ethloop
338 +(<a href=http://luxik.cdi.cz/~devik/qos/ethloop/>luxik.cdi.cz/~devik/qos/ethloop/</a>).
339 +
340 +</body></html>
341 --- iproute-20071016.orig/debian/doc/htb/userg.htm
342 +++ iproute-20071016/debian/doc/htb/userg.htm
343 @@ -0,0 +1,449 @@
344 +<html><head><title>HTB manual - user guide</title></head>
345 +<body>
346 +<h1><center>HTB Linux queuing discipline manual - user guide</center></h1>
347 +<center><address>
348 +Martin Devera aka devik (devik@cdi.cz)<br>
349 +Manual: devik and Don Cohen<br>
350 +Last updated: 5.5.2002
351 +</address></center>
352 +<br>
353 +New text is in red color. Coloring is removed on new text
354 +after 3 months. Currently they depicts HTB3 changes<p>
355 +<p>
356 +<ul>
357 +<li><a href=#intro>1. Introduction</a>
358 +<li><a href=#sharing>2. Link sharing</a>
359 +<li><a href=#hsharing>3. Sharing hierarchy</a>
360 +<li><a href=#ceiling>4. Rate ceiling</a>
361 +<li><a href=#burst>5. Burst</a>
362 +<li><a href=#prio>6. Priorizing bandwidth share</a>
363 +<li><a href=#stats>7. Understanding statistics</a>
364 +<li><a href=#err>8. Making, debugging and sending error reports</a>
365 +</ul>
366 +<a name=intro><h2>1. Introduction</h2>
367 +
368 +HTB is meant as a more understandable, intuitive and faster replacement for the
369 +CBQ qdisc in Linux. Both CBQ and HTB help you to control the
370 +use of the outbound bandwidth on a given link. Both allow you to use
371 +one physical link to simulate several slower links and to send different
372 +kinds of traffic on different simulated links. In both cases, you have
373 +to specify how to divide the physical link into simulated links and how
374 +to decide which simulated link to use for a given packet to be sent.
375 +<p>
376 +This document shows you how to use HTB.
377 +Most sections have examples, charts (with measured data) and
378 +discussion of particular problems.
379 +<p>
380 +This release of HTB should be also much more scalable. See
381 +comparison at HTB home page.
382 +<p>
383 +<b>Please read:</b> tc tool (not only HTB) uses shortcuts to denote units
384 +of rate. <b>kbps</b> means kilo<b>bytes</b> and <b>kbit</b> means
385 +<b>kilobits</b> ! This is the most FAQ about tc in linux.
386 +<p>
387 +
388 +<a name=sharing><h2>2. Link sharing</h2>
389 +<img src=Ag2Leaf3flat.gif align=right>
390 +
391 +<i>Problem: We have two customers, A and B, both connected to the
392 +internet via eth0. We want to allocate 60 kbps to B and 40 kbps to A.
393 +Next we want to subdivide A's bandwidth 30kbps for WWW and 10kbps
394 +for everything else. Any unused bandwidth can be used by any class
395 +which needs it (in proportion of its allocated share).</i>
396 +<p>
397 +HTB ensures that <b> the amount of service provided to each class is
398 +at least the minimum of the amount it requests and the amount assigned
399 +to it</b>. When a class requests less than the amount assigned, the
400 +remaining (excess) bandwidth is distributed to other classes which request
401 +service.<p>
402 +Also see document about HTB internals - it
403 +describes goal above in greater details.
404 +<p>
405 +<i>Note: In the literature this is called "borrowing" the excess bandwidth.
406 +We use that term below to conform with the literature. We mention, however,
407 +that this seems like a bad term since there is no obligation to repay the
408 +resource that was "borrowed".
409 +</i>
410 +<p>
411 +The different kinds of traffic above are represented by classes in
412 +HTB. The simplest approach is shown in the picture at the right.
413 +<br>
414 +Let's see what commands to use:
415 +<pre>
416 +tc qdisc add dev eth0 root handle 1: htb default 12
417 +</pre>
418 +This command attaches queue discipline HTB to eth0 and gives it the
419 +"handle" <b>1:</b>.
420 +This is just a name or identifier with which to refer to it below.
421 +The <b>default 12</b>
422 +means that any traffic that is not otherwise classified will be assigned
423 +to class 1:12.
424 +<p>
425 +<i>Note:
426 +In general (not just for HTB but for all qdiscs and classes in tc),
427 +handles are written x:y where x is an integer identifying a qdisc and
428 +y is an integer identifying a class belonging to that qdisc. The handle
429 +for a qdisc must have zero for its y value and the handle for a class
430 +must have a non-zero value for its y value. The "1:" above is treated
431 +as "1:0".
432 +</i>
433 +<p>
434 +<pre>
435 +tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
436 +tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbps ceil 100kbps
437 +tc class add dev eth0 parent 1:1 classid 1:11 htb rate 10kbps ceil 100kbps
438 +tc class add dev eth0 parent 1:1 classid 1:12 htb rate 60kbps ceil 100kbps
439 +</pre>
440 +<p>
441 +The first line creates a "root" class, 1:1 under the qdisc 1:.
442 +The definition of a root class is one with the htb qdisc as its parent.
443 +A root class, like other classes under an htb qdisc allows its children
444 +to borrow from each other, but one root class cannot borrow from another.
445 +We could have created the other three classes directly under the htb qdisc,
446 +but then the excess bandwidth from one would not be available to the others.
447 +In this case we do want to allow borrowing, so we have to create an extra
448 +class to serve as the root and put the classes that will carry the real data
449 +under that. These are defined by the next three lines.
450 +The <b>ceil</b> parameter is described below.
451 +<p><i>Note: Sometimes people ask me why they have to repeat <b>dev eth0</b>
452 +when they have already used <b>handle</b> or <b>parent</b>. The reason
453 +is that handles are local to an interface, e.g., eth0 and eth1 could each
454 +have classes with handle 1:1.</i>
455 +<p>
456 +We also have to describe which packets belong in which class.
457 +This is really not related to the HTB qdisc. See the tc filter
458 +documentation for details. The commands will look something like this:
459 +<pre>
460 +tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 \
461 + match ip src 1.2.3.4 match ip dport 80 0xffff flowid 1:10
462 +tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 \
463 + match ip src 1.2.3.4 flowid 1:11
464 +</pre>
465 +(We identify A by its IP address which we imagine here to be 1.2.3.4.)
466 +<p><i>Note: The U32 classifier has an undocumented design bug which causes
467 +duplicate entries to be listed by "tc filter show" when you use U32
468 +classifiers with different prio values.</i>
469 +<img src=flatnp.gif align=right>
470 +<p>
471 +You may notice that we didn't create a filter for the 1:12 class.
472 +It might be more clear to do so, but this illustrates the use of the default.
473 +Any packet not classified by the two rules above (any packet
474 +not from source address 1.2.3.4) will be put in class 1:12.
475 +<p>
476 +Now we can optionally attach queuing disciplines to the leaf classes.
477 +If none is specified the default is pfifo.
478 +<pre>
479 +tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5
480 +tc qdisc add dev eth0 parent 1:11 handle 30: pfifo limit 5
481 +tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10
482 +</pre>
483 +That's all the commands we need. Let's see what happens if we send
484 +packets of each class at 90kbps and then stop sending packets of one
485 +class at a time. Along the bottom of the graph are annotations
486 +like "0:90k". The horizontal position at the center of the label
487 +(in this case near the 9, also marked with a red "1") indicates the
488 +time at which the rate of some traffic class changes.
489 +Before the colon is an identifier for
490 +the class (0 for class 1:10, 1 for class 1:11, 2 for class 1:12) and
491 +after the colon is the new rate starting at the time where the
492 +annotation appears. For example, the rate of class 0 is changed to
493 +90k at time 0, 0 (= 0k) at time 3, and back to 90k at time 6.
494 +<p>
495 +Initially all classes generate 90kb. Since this is higher than any
496 +of the rates specified, each class is limited to its
497 +specified rate. At time 3 when we stop sending class 0 packets, the
498 +rate allocated to class 0 is reallocated to the other two
499 +classes in proportion to their allocations, 1 part class 1 to 6 parts class 2.
500 +(The increase in class 1 is hard to see because it's only 4 kbps.)
501 +Similarly at time 9 when class 1 traffic stops its bandwidth is
502 +reallocated to the other two (and the increase in class 0 is similarly hard
503 +to see.) At time 15 it's easier to see that the allocation to class 2 is
504 +divided 3 parts for class 0 to 1 part for class 1. At time 18 both class 1 and
505 +class 2 stop so class 0 gets all 90 kbps it requests.
506 +<p>
507 +It might be good time to touch concept of <b>quantums</b> now. In fact when
508 +more classes want to borrow bandwidth they are each given some number of
509 +bytes before serving other competing class. This number is called quantum.
510 +You should see that if several classes are competing for parent's bandwidth
511 +then they get it in proportion of their quantums. It is important to know
512 +that for precise operation quantums need to be as small as possible and
513 +larger than MTU.
514 +<br>
515 +Normaly you don't need to specify quantums manualy as HTB chooses precomputed
516 +values. It computes classe's quantum (when you add or change it) as its
517 +rate divided by <b>r2q</b> global parameter. Its default value is 10
518 +and because typical MTU is 1500 the default is good for rates from
519 +15 kBps (120 kbit). For smaller minimal rates specify r2q 1 when
520 +creating qdisc - it is good from 12 kbit which should be enough. If
521 +you will need you can specify quantum manualy when adding or changing
522 +the class. You can avoid warnings in log if precomputed value would be
523 +bad. When you specify quantum on command line the r2q is ignored for
524 +that class.
525 +<p>
526 +This might seem like a good solution if A and B were not different
527 +customers. However, if A is paying for 40kbps then he would probably
528 +prefer his unused WWW bandwidth to go to his own other service rather
529 +than to B. This requirement is represented in HTB by the class hierarchy.
530 +
531 +<img src=Ag2Leaf3hier.gif align=right>
532 +<a name=hsharing><h2>3. Sharing hierarchy</h2>
533 +The problem from the previous chapter is solved by the class hierarchy
534 +in this picture. Customer A is now explicitly represented by its own
535 +class. Recall from above that
536 +<b> the amount of service provided to each class is at least the
537 +minimum of the amount it requests and the amount assigned to it</b>.
538 +This applies to htb classes that are not parents of other htb classes.
539 +We call these leaf classes.
540 +For htb classes that are parents of other htb classes, which we call
541 +interior classes, the rule is that
542 +<b> the amount of service is at least the minumum of the amount assigned
543 +to it and the sum of the amount requested by its children</b>.
544 +In this case we assign 40kbps to customer A. That means that if A
545 +requests less than the allocated rate for WWW, the excess will be used
546 +for A's other traffic (if there is demand for it), at least until the sum is
547 +40kbps.
548 +<p>
549 +<i>Notes: Packet classification rules can assign to inner nodes too. Then
550 +you have to attach other filter list to inner node. Finally you should
551 +reach leaf or special 1:0 class. The rate supplied for a parent should be the sum
552 +of the rates of its children. </i>
553 +<p>The commands are now as follows:
554 +<pre>
555 +tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
556 +tc class add dev eth0 parent 1:1 classid 1:2 htb rate 40kbps ceil 100kbps
557 +tc class add dev eth0 parent 1:2 classid 1:10 htb rate 30kbps ceil 100kbps
558 +tc class add dev eth0 parent 1:2 classid 1:11 htb rate 10kbps ceil 100kbps
559 +tc class add dev eth0 parent 1:1 classid 1:12 htb rate 60kbps ceil 100kbps
560 +</pre>
561 +<img src=hiernp.gif align=right>
562 +<p>
563 +We now turn to the graph showing the results of the hierarchical solution.
564 +When A's WWW traffic stops, its assigned bandwidth is reallocated to A's
565 +other traffic so that A's total bandwidth is still the assigned 40kbps.<br>
566 +If A were to request less than 40kbs in total then the excess would be given to B.
567 +
568 +<a name=ceiling><h2>4. Rate ceiling</h2>
569 +The <b>ceil</b> argument specifies the maximum bandwidth that a class
570 +can use. This limits how much bandwidth that class can borrow.
571 +The default ceil is the same as the rate. (That's why we had to specify
572 +it in the examples above to show borrowing.)
573 +We now change the <b>ceil 100kbps</b> for classes 1:2 (A) and 1:11
574 +(A's other) from the previous chapter to <b>ceil 60kbps</b> and
575 +<b>ceil 20kbps</b>.
576 +<p>
577 +The graph at right differs from the previous one at time 3 (when WWW
578 +traffic stops) because A/other is limited to 20kbps. Therefore customer
579 +A gets only 20kbps in total and the unused 20kbps is allocated to B.<br>
580 +The second difference is at time 15 when B stops. Without the ceil,
581 +all of its bandwidth was given to A, but now A is only allowed to use
582 +60kbps, so the remaining 40kbps goes unused.
583 +<img src=hiernpceil.gif align=right>
584 +<p>
585 +This feature should be useful for ISPs because they probably want to
586 +limit the amount of service a given customer gets even when other
587 +customers are not requesting service. (ISPs probably want customers
588 +to pay more money for better service.)
589 +Note that root classes are not allowed to borrow, so there's really no
590 +point in specifying a ceil for them.
591 +<p>
592 +<i>Notes: The ceil for a class should always be at least as high as the rate.
593 +Also, the ceil for a class should always be at least as high as the ceil of
594 +any of its children.</i>
595 +
596 +<a name=burst><h2>5. Burst</h2>
597 +
598 +Networking hardware can only send one packet at a time and only at
599 +a hardware dependent rate. Link sharing software can only use this
600 +ability to approximate the effects of multiple links running at
601 +different (lower) speeds. Therefore the rate and ceil are not really
602 +instantaneous measures but averages over the time that it takes to send
603 +many packets. What really happens is that the traffic from one class
604 +is sent a few packets at a time at the maximum speed and then other
605 +classes are served for a while.
606 +
607 +The <b>burst</b> and <b>cburst</b> parameters control the amount of data
608 +that can be sent at the maximum (hardware) speed without trying to serve
609 +another class.
610 +<p>
611 +If <b>cburst</b> is smaller (ideally one packet size) it shapes bursts to not exceed
612 +<b>ceil</b> rate in the same way as TBF's peakrate does.<p>
613 +When you set <b>burst</b> for parent class smaller than for some child
614 +then you should expect the parent class to get stuck sometimes (because
615 +child will drain more than parent can handle). HTB will remember these
616 +negative bursts up to 1 minute.
617 +<p>
618 +You can ask <b>why I want bursts</b>. Well it is cheap and simple way
619 +how to improve response times on congested link. For example www traffic
620 +is bursty. You ask for page, get it in burst and then read it. During
621 +that idle period burst will "charge" again.
622 +<p>
623 +<i>Note: The burst and cburst of a class should always be at least
624 +as high as that of any of it children.</i>
625 +<p>
626 +<img src=hiernpburst.gif align=right>
627 +On graph you can see case from previous chapter where I changed burst
628 +for red and yellow (agency A) class to 20kb but cburst remained
629 +default (cca 2 kb).<br>
630 +Green hill is at time 13 due to burst setting on SMTP class.
631 +A class. It has underlimit since time 9 and accumulated 20 kb of burst.
632 +The hill is high up to 20 kbps (limited by ceil because it has cburst
633 +near packet size).<br>
634 +Clever reader can think why there is not red and yellow hill at time
635 +7. It is because yellow is already at ceil limit so it has no space
636 +for furtner bursts.<br>
637 +There is at least one unwanted artifact - magenta crater at time 4. It
638 +is because I intentionaly "forgot" to add burst to root link (1:1) class.
639 +It remembered hill from time 1 and when at time 4 blue class wanted to
640 +borrow yellow's rate it denied it and compensated itself.
641 +<p>
642 +<b>Limitation:</b> when you operate with high rates on computer with low
643 +resolution timer you need some minimal <b>burst</b> and <b>cburst</b> to
644 +be set for all classes. Timer resolution on i386 systems is 10ms and
645 +1ms on Alphas.
646 +The minimal burst can be computed as max_rate*timer_resolution. So that
647 +for 10Mbit on plain i386 you needs burst 12kb.<p>
648 +If you set too small burst you will encounter smaller rate than you set.
649 +Latest tc tool will compute and set the smallest possible burst when it
650 +is not specified.
651 +
652 +<img src=hierprio.gif align=right>
653 +<a name=prio><h2>6. Priorizing bandwidth share</h2>
654 +Priorizing traffic has two sides. First it affects how the excess bandwidth
655 +is distributed among siblings. Up to now we have seen that excess bandwidth
656 +was distibuted according to rate ratios. Now I used basic configuration from
657 +chapter 3 (hierarchy without ceiling and bursts) and changed priority of all
658 +classes to 1 except SMTP (green) which I set to 0 (higher).<br>
659 +From sharing view you see that the class got all the excess bandwidth. The
660 +rule is that <b>classes with higher priority are offered excess bandwidth
661 +first</b>. But rules about guaranted <b>rate</b> and <b>ceil</b> are still
662 +met.<p>
663 +There is also second face of problem. It is total delay of packet. It is relatively
664 +hard to measure on ethernet which is too fast (delay is so neligible). But
665 +there is simple help. We can add simple HTB with one class rate limiting to
666 +less then 100 kbps and add second HTB (the one we are measuring) as child. Then we
667 +can simulate slower link with larger delays.<br>
668 +For simplicity sake I use simple two class scenario:
669 +<pre>
670 +# qdisc for delay simulation
671 +tc qdisc add dev eth0 root handle 100: htb
672 +tc class add dev eth0 parent 100: classid 100:1 htb rate 90kbps
673 +
674 +# real measured qdisc
675 +tc qdisc add dev eth0 parent 100:1 handle 1: htb
676 +AC="tc class add dev eth0 parent"
677 +$AC 1: classid 1:1 htb rate 100kbps
678 +$AC 1:2 classid 1:10 htb rate 50kbps ceil 100kbps prio 1
679 +$AC 1:2 classid 1:11 htb rate 50kbps ceil 100kbps prio 1
680 +tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 2
681 +tc qdisc add dev eth0 parent 1:11 handle 21: pfifo limit 2
682 +</pre>
683 +<img src=priotime.gif align=right>
684 +<i>Note: HTB as child of another HTB is NOT the same as class under
685 +another class within the same HTB. It is because when class in HTB can send
686 +it will send as soon as hardware equipment can. So that delay of underlimit
687 +class is limited only by equipment and not by ancestors.<br>
688 +In HTB under HTB case the outer HTB simulates new hardware equipment with
689 +all consequences (larger delay)</i>
690 +<p>
691 +Simulator is set to generate 50 kbps for both classes and at time 3s it
692 +executes command:
693 +<pre>
694 +tc class change dev eth0 parent 1:2 classid 1:10 htb \
695 + rate 50kbps ceil 100kbps burst 2k prio 0
696 +</pre>
697 +As you see the delay of WWW class dropped nearly to the zero while
698 +SMTP's delay increased. When you priorize to get better delay it always
699 +makes other class delays worse.<br>
700 +Later (time 7s) the simulator starts to generate WWW at 60 kbps and SMTP at 40 kbps.
701 +There you can observe next interesting behaviour. When class is overlimit
702 +(WWW) then HTB priorizes underlimit part of bandwidth first.<p>
703 +<b>What class should you priorize ?</b> Generaly those classes where
704 +you really need low delays. The example could be video or audio
705 +traffic (and you will really need to use correct <b>rate</b> here
706 +to prevent traffic to kill other ones) or interactive (telnet, SSH)
707 +traffic which is bursty in nature and will not negatively affect
708 +other flows.<br>
709 +Common trick is to priorize ICMP to get nice ping delays even on fully
710 +utilized links (but from technical point of view it is not what you want when
711 +measuring connectivity).
712 +
713 +<a name=stats><h2>7. Understanding statistics</h2>
714 +The <b>tc</b> tool allows you to gather statistics of queuing disciplines in Linux.
715 +Unfortunately statistic results are not explained by authors so that you often can't
716 +use them. Here I try to help you to understand HTB's stats.<br>
717 +First whole HTB stats. The snippet bellow is taken during simulation from chapter 3.
718 +<pre>
719 +# tc -s -d qdisc show dev eth0
720 + qdisc pfifo 22: limit 5p
721 + Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
722 +
723 + qdisc pfifo 21: limit 5p
724 + Sent 2891500 bytes 5783 pkts (dropped 820, overlimits 0)
725 +
726 + qdisc pfifo 20: limit 5p
727 + Sent 1760000 bytes 3520 pkts (dropped 3320, overlimits 0)
728 +
729 + qdisc htb 1: r2q 10 default 1 direct_packets_stat 0
730 + Sent 4651500 bytes 9303 pkts (dropped 4140, overlimits 34251)
731 +</pre>
732 +First three disciplines are HTB's children. Let's ignore them as PFIFO
733 +stats are self explanatory.<br>
734 +<i>overlimits</i> tells you how many times the discipline delayed a packet.
735 +<i>direct_packets_stat</i> tells you how many packets was sent thru direct queue.
736 +Other stats are sefl explanatory. Let's look at class' stats:
737 +<pre>
738 +tc -s -d class show dev eth0
739 +class htb 1:1 root prio 0 rate 800Kbit ceil 800Kbit burst 2Kb/8 mpu 0b
740 + cburst 2Kb/8 mpu 0b quantum 10240 level 3
741 + Sent 5914000 bytes 11828 pkts (dropped 0, overlimits 0)
742 + rate 70196bps 141pps
743 + lended: 6872 borrowed: 0 giants: 0
744 +
745 +class htb 1:2 parent 1:1 prio 0 rate 320Kbit ceil 4000Kbit burst 2Kb/8 mpu 0b
746 + cburst 2Kb/8 mpu 0b quantum 4096 level 2
747 + Sent 5914000 bytes 11828 pkts (dropped 0, overlimits 0)
748 + rate 70196bps 141pps
749 + lended: 1017 borrowed: 6872 giants: 0
750 +
751 +class htb 1:10 parent 1:2 leaf 20: prio 1 rate 224Kbit ceil 800Kbit burst 2Kb/8 mpu 0b
752 + cburst 2Kb/8 mpu 0b quantum 2867 level 0
753 + Sent 2269000 bytes 4538 pkts (dropped 4400, overlimits 36358)
754 + rate 14635bps 29pps
755 + lended: 2939 borrowed: 1599 giants: 0
756 +</pre>
757 +I deleted 1:11 and 1:12 class to make output shorter. As you see there
758 +are parameters we set. Also there are <i>level</i> and DRR <i>quantum</i>
759 +informations.<br>
760 +<i>overlimits</i> shows how many times class was asked to send packet
761 +but he can't due to rate/ceil constraints (currently counted for leaves only).<br>
762 +<i>rate, pps</i> tells you actual (10 sec averaged) rate going thru class. It
763 +is the same rate as used by gating.<br>
764 +<i>lended</i> is # of packets donated by this class (from its <b>rate</b>) and
765 +<i>borrowed</i> are packets for whose we borrowed from parent. Lends are always
766 +computed class-local while borrows are transitive (when 1:10 borrows from 1:2 which
767 +in turn borrows from 1:1 both 1:10 and 1:2 borrow counters are incremented).<br>
768 +<i>giants</i> is number of packets larger than mtu set in tc command. HTB will
769 +work with these but rates will not be accurate at all. Add mtu to your tc (defaults
770 +to 1600 bytes).<br>
771 +
772 +<a name=err><h2>8. Making, debugging and sending error reports</h2>
773 +<font color=red date=30.12.2002>
774 +If you have kernel 2.4.20 or newer you don't need to patch it - all
775 +is in vanilla tarball. The only thing you need is <b>tc</b> tool.
776 +Download HTB 3.6 tarball and use tc from it.
777 +</font><p>
778 +You have to patch to make it work with older kernels. Download kernel source and
779 +use <b>patch -p1 -i htb3_2.X.X.diff</b> to apply the patch. Then use
780 +<b>make menuconfig;make bzImage</b> as before. Don't forget to enable QoS and HTB.<br>
781 +Also you will have to use patched <b>tc</b> tool. The patch is also
782 +in downloads or you can download precompiled binary.<p>
783 +If you think that you found an error I will appreciate error report.
784 +For oopses I need ksymoops output. For weird qdisc behaviour add
785 +parameter <b>debug 3333333</b> to your <b>tc qdisc add .... htb</b>.
786 +It will log many megabytes to syslog facility kern level debug. You
787 +will probably want to add line like:<br>
788 +<b>kern.debug -/var/log/debug</b><br>
789 +to your /etc/syslog.conf. Then bzip and send me the log via email
790 +(up to 10MB after bzipping) along with description of problem and
791 +its time.
792 +</body></html>
793 --- iproute-20071016.orig/debian/copyright
794 +++ iproute-20071016/debian/copyright
795 @@ -0,0 +1,44 @@
796 +This is the Debian GNU/Linux's prepackaged version of the
797 +Linux Traffic Control engine and related utils, "iproute"
798 +
799 +The source code was obtained from
800 + http://developer.osdl.org/dev/iproute2
801 +The former upstream was
802 + ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.4.7-now-ss010824.tar.gz
803 +
804 +Copyrights
805 +----------
806 +Copyright (C) 1996-2001 Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
807 +Copyright (C) Stephen Hemminger <shemminger@osdl.org>
808 +and others, including, but not limited to
809 + Copyright (C) 2004 USAGI/WIDE Project
810 + Copyright (C) J Hadi Salim (hadi@cyberus.ca)
811 +
812 +Modifications for Debian:
813 + Copyright (C) 1996 Tom Lees <tom@lpsg.demon.co.uk>
814 + Copyright (C) 1998 Christoph Lameter <christoph@lameter.com>
815 + Copyright (C) 1998-1999 Roberto Lumbreras <rover@debian.org>
816 + Copyright (C) 1999-2003 Juan Cespedes <cespedes@debian.org>
817 + Copyright (C) 2005- Alexander Wirt <formorer@debian.org>
818 +
819 +
820 +License
821 +-------
822 +
823 +This program is free software; you can redistribute it and/or modify
824 +it under the terms of the GNU General Public License as published by
825 +the Free Software Foundation; either version 2, or (at your option)
826 +any later version.
827 +
828 +This program is distributed in the hope that it will be useful, but
829 +WITHOUT ANY WARRANTY; without even the implied warranty of
830 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
831 +General Public License for more details.
832 +
833 +A copy of the GNU General Public License is available as
834 +`/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution
835 +or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'.
836 +You can also obtain it by writing to the Free Software Foundation,
837 +Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
838 +MA 02110-1301, USA.
839 +
840 --- iproute-20071016.orig/debian/iproute.links
841 +++ iproute-20071016/debian/iproute.links
842 @@ -0,0 +1,9 @@
843 +/usr/bin/lnstat usr/bin/rtstat
844 +/usr/bin/lnstat usr/bin/ctstat
845 +bin/ip sbin/ip
846 +/usr/share/man/man8/tc-pfifo.8.gz /usr/share/man/man8/tc-bfifo.8.gz
847 +/usr/share/man/man8/lnstat.8.gz /usr/share/man/man8/rtstat.8.gz
848 +/usr/share/man/man8/lnstat.8.gz /usr/share/man/man8/ctstat.8.gz
849 +/usr/share/man/man8/rtacct.8.gz /usr/share/man/man8/nstat.8.gz
850 +/usr/share/man/man8/routel.8.gz /usr/share/man/man8/routef.8.gz
851 +
852 --- iproute-20071016.orig/debian/README.Debian
853 +++ iproute-20071016/debian/README.Debian
854 @@ -0,0 +1,6 @@
855 +iproute for Debian
856 +------------------
857 +
858 +If you want use tc with the atm based queue you have to install libatm1 first.
859 +
860 + -- Alexander Wirt <formorer@debian.org> Fri, 28 Dec 2007 11:56:28 +0100
861 --- iproute-20071016.orig/debian/changelog
862 +++ iproute-20071016/debian/changelog
863 @@ -0,0 +1,472 @@
864 +iproute (20071016-3) unstable; urgency=low
865 +
866 + [ Alexander Wirt ]
867 + * Prevent q_atm from being scanned by dh_shlibdeps
868 + * Bump priority to important (Closes: #414086)
869 + * Make iproute-doc architecture all
870 +
871 + [ Andreas Henriksson ]
872 + * Revert "fix dotted-quad support patch to work on big-endian",
873 + and cherry-pick official upstream fix.
874 + * Revert "TC action parsing bug fix" (Closes: #458539)
875 + * Add synonyms for ip rule options to ip(8) manpage,
876 + and drop ip_rule_usage.dpatch (Closes: #433507)
877 + * Add routel and routef man page. (Closes: #325290)
878 +
879 + -- Alexander Wirt <formorer@debian.org> Fri, 04 Jan 2008 23:04:36 +0100
880 +
881 +iproute (20071016-2) unstable; urgency=low
882 +
883 + [ Andreas Henriksson ]
884 + * fix incompatibility with older kernels (Closes: #457161)
885 + (Cherry picked from upstream)
886 +
887 + -- Alexander Wirt <formorer@debian.org> Thu, 20 Dec 2007 23:05:25 +0100
888 +
889 +iproute (20071016-1) unstable; urgency=low
890 +
891 + [ Andreas Henriksson ]
892 + * New upstream release (v2.6.23 aka snapshot 071016) (Closes: #445944)
893 + - time2tick overflow patch applied upstream (Closes: #175462)
894 + - tc ematch cmp/nbyte help patch applied upstream (Closes: #438653)
895 + - mpath support dropped upstream (Closes: #428440, #428442)
896 + - new manpages included upstream (Closes: #438994)
897 + - linux header files updated to v2.6.23 (Closes: #409047)
898 + * Drop patches which has been applied upstream or deprecated by
899 + upstream changes.
900 + - debian/patches/lartc applied upstream.
901 + - debian/patches/netbug_fix deprecated, upstream dropped netbug script.
902 + - debian/patches/empty_linkname.dpatch deprecated, fixed upstream.
903 + * Add .dpatch suffix to wrr-qdisc patch to make dpatch-edit-patch work.
904 + * Update patches to apply:
905 + - wrr-qdisc, moo, ip_route_usage
906 + * Don't install removed netbug script.
907 + * Fix corruption when using batch files with comments and broken
908 + lines. (cherry-picked from upstream. Closes: #398912)
909 + * Update build-dependencies:
910 + - libdb4.3-dev -> libdb-dev. (Closes: #442653)
911 + - linux-kernel-headers -> linux-libc-dev.
912 + * Drop debian/patches/ip_address_flush_loop.dpatch,
913 + instead we'll use Daniel Silverstones patch imported from Ubuntu.
914 + * Add Homepage and Vcs-{Browser,Git} fields to debian/control.
915 + * Remove dead/leftover code from tc/q_htb.c, include/linux/pkt_sched.h
916 + * Remove outdated README.Debian.
917 + * Drop our own (buggy) RTAX_INITCWND support, in favor of upstreams.
918 + * fix dotted-quad support patch to work on big-endian.
919 + (upstream applied a broken patch, which we cherry-picked for #357172)
920 +
921 + [ Ben Finney ]
922 + * Add dh_md5sums to generate md5sums control file (Closes: #439439)
923 +
924 + [ Justin Pryzby ]
925 + * ss(8) manpage formatting breaks EXAMPLE (Closes: #443071)
926 +
927 + [ Daniel Silverstone ]
928 + * Avoid infinite loop in ip addr flush.
929 +
930 + [ Alexander Wirt ]
931 + * Add Andreas Henriksson to uploaders
932 + * Bump standards version
933 + * Support dotted-quad netmasks in iproute (Closes: #357172) (Cherry picked
934 + from upstream)
935 +
936 + -- Alexander Wirt <formorer@debian.org> Sun, 16 Dec 2007 14:30:31 +0100
937 +
938 +iproute (20070313-1) unstable; urgency=low
939 +
940 + * New upstream release
941 + * Make iproute-doc a suggest (Closes: #424967)
942 + * Add tc_cbq_details_typo.dpatch (Closes: #387083)
943 + * Add libnetlink_typo.dpatch (Closes: #396124)
944 + * Add tcb_htb_typo.dpatch (Closes: #396317)
945 + * Remove references to non-existing tc-filters manpage (Closes:
946 + #298715)
947 + * Fix bad phrased sentence in ss manpage (Closes: #401552)
948 +
949 + -- Alexander Wirt <formorer@debian.org> Sun, 10 Jun 2007 19:36:48 +0200
950 +
951 +iproute (20061002-4) unstable; urgency=low
952 +
953 + * Add distribution tables (used by netem).
954 + (Closes: #408313)
955 +
956 + -- Alexander Wirt <formorer@debian.org> Wed, 24 Jan 2007 22:55:26 +0100
957 +
958 +iproute (20061002-3) unstable; urgency=low
959 +
960 + * Added a patch from Nikolai Kondrashov that fixes unknown
961 + symbols in ip_common.h. (Closes: #397584)
962 +
963 + -- Alexander Wirt <formorer@debian.org> Thu, 14 Dec 2006 20:11:55 +0100
964 +
965 +iproute (20061002-2) unstable; urgency=medium
966 +
967 + * Add manpage for ss, rtmon and lnstat (Thanks to Michael Prokop for that)
968 + * Fix metric output of iproute (backported from git)
969 + (http://bugs.archlinux.org/task/5669)
970 + * medium as this bug breaks other packages such as vpnc
971 +
972 + -- Alexander Wirt <formorer@debian.org> Thu, 19 Oct 2006 06:39:05 +0200
973 +
974 +iproute (20061002-1) unstable; urgency=low
975 +
976 + * New upstream release
977 + - This fixes the xfrm monitor mode (Closes: #383133)
978 + * Fix typos in manpages (Closes: #387082, #387083)
979 + * Split docs in a seperate package
980 +
981 + -- Alexander Wirt <formorer@debian.org> Sun, 15 Oct 2006 16:40:34 +0200
982 +
983 +iproute (20060323-1) unstable; urgency=low
984 +
985 + * New upstream release (Closes: #370699)
986 + * Removed reenable_short_matches, tc_sample_fix, f_u32 patches (included
987 + upstream)
988 + * Add manpage for pfifo (Closes: #359971)
989 + * Add moo object (Closes: #312843)
990 + * Add src option to ip_route usage (Closes: #226142)
991 + * Prevent users from renaming an interface to "" (Closes: #241904)
992 + * Added timout for ip a f (Closes: #386288)
993 +
994 + -- Alexander Wirt <formorer@debian.org> Fri, 8 Sep 2006 16:43:20 +0200
995 +
996 +iproute (20051007-4) unstable; urgency=low
997 +
998 + * Moved *stat binaries to /usr/bin/ (Closes: #350703)
999 + * Fixed some manpage typos
1000 + (Closes: #350671, #350672, #350673, #350674, #350675)
1001 + * Conflicts with arpd
1002 + * Fixes u32 bucket hashing calucation. (Closes: #351751)
1003 + Thanks to Russel Stuart for the patch
1004 + * Moved to libdb4.3
1005 + * Fixed ip help output (Closes: #354909)
1006 + * Fixed hardcoded module paths for tc (Closes: #290315)
1007 +
1008 + -- Alexander Wirt <formorer@debian.org> Sun, 5 Feb 2006 09:47:36 +0100
1009 +
1010 +iproute (20051007-3) unstable; urgency=low
1011 +
1012 + * New upstream release (Closes: #333643)
1013 + * Added a patch for tc that add u32 get parsed correct
1014 + Thanks Russell Stuart for the patch (Closes: #347699)
1015 + * We now have a manpage for tc-bfifo (Closes: #319871)
1016 + * "get" is no longer mentioned in tc's usage (Closes: #167314)
1017 + * We now build arpd (Closes: #296200)
1018 + * Include htb docs (Closes: #204629)
1019 + * Added flex to build-deps (Closes: #340004, #339119)
1020 + * Added symlinks for lnstat (Closes: #302589)
1021 + * Acknowledge heap correction nmu (Closes: #326961)
1022 + * Acknowledge douple free fix nmu (Closes: #338575)
1023 + * Fixed allmulticast mention in ip manpage (Closes: #305338)
1024 + * Add [ prio NUMBER ] to ip_rule.c (Closes: #213673)
1025 +
1026 + -- Alexander Wirt <formorer@debian.org> Sun, 5 Feb 2006 09:37:01 +0100
1027 +
1028 +iproute (20051007-2) experimental; urgency=low
1029 +
1030 + * Added flex to build-deps
1031 +
1032 + -- Alexander Wirt <formorer@debian.org> Sun, 20 Nov 2005 10:46:39 +0100
1033 +
1034 +iproute (20051007-1) experimental; urgency=low
1035 +
1036 + * The "lets break other peoples networking release"
1037 + + New upstream release
1038 + + New maintainer
1039 + + Fix netbug script
1040 + + Reenable short iproute commands
1041 +
1042 + -- Alexander Wirt <formorer@debian.org> Tue, 1 Nov 2005 10:22:05 +0100
1043 +
1044 +iproute (20041019-4.1) unstable; urgency=low
1045 +
1046 + * Non-maintainer upload.
1047 + * Fix size of table allocation (closes: #326961, #338575)
1048 +
1049 + -- Blars Blarson <blarson@blars.org> Sat, 14 Jan 2006 02:07:18 +0000
1050 +
1051 +iproute (20041019-4) unstable; urgency=low
1052 +
1053 + * New maintainer, closes: #295122.
1054 + * Included iproute2 homepage in debian/control and updated it in
1055 + debian/copyright.
1056 + * Updated FSF mail address in debian/copyright.
1057 + * Set Standards-Version to 3.6.2 in debian/control.
1058 + * Fixed "FTBFS: normal.c heap corrution due to table overflow",
1059 + closes: #326961. Patch by LaMont Jones <lamont@debian.org>.
1060 + * Fixed "Netbug script gives syntax error", closes: #313540.
1061 + Patch by Allard Hoeve <allard@byte.nl>.
1062 + * Fixed "Netbug creates uuencoded file with wrong suffix", closes:
1063 + #313541. Patch by Allard Hoeve <allard@byte.nl>.
1064 + * Fixed "Netbug warns about intended stripping of trailing '/'",
1065 + closes: #313544. Patch by Allard Hoeve <allard@byte.nl>.
1066 +
1067 + -- Anibal Monsalve Salazar <anibal@debian.org> Fri, 11 Nov 2005 13:22:15 +1100
1068 +
1069 +iproute (20041019-3) unstable; urgency=medium
1070 +
1071 + * fix insecure file creation in netbug. Closes: #289541
1072 + * remove bogus reference to tc-filters from tc's manpage. Closes: #289225
1073 + * add support for "hoplimit" and "initcwnd" route metrics. Closes: #221893
1074 + * ikey for GRE works. Closes: #200714
1075 + * include wrr qdisc. Closes: #198414
1076 +
1077 + -- Andreas Barth <aba@not.so.argh.org> Sun, 9 Jan 2005 11:51:09 +0000
1078 +
1079 +iproute (20041019-2) unstable; urgency=low
1080 +
1081 + * build fails if subdir fails. Closes: #283797
1082 + * include q_netem.so. Closes: #283968
1083 + * fix typo in man page. Closes: #285507
1084 + * removed the 2. and 3. copy of the man pages.
1085 + * start using dpatch.
1086 + * add reference to Advanced Routing HOWTO. Closes: #150087
1087 +
1088 + -- Andreas Barth <aba@not.so.argh.org> Wed, 5 Jan 2005 21:20:44 +0000
1089 +
1090 +iproute (20041019-1) unstable; urgency=low
1091 +
1092 + * New maintainer.
1093 + * packaging changes:
1094 + + using debhelper
1095 + + add all manpages. Closes: #57829, #138432, #203797, #246521
1096 + + add documentation text and html doc, and adding lynx as build-dep.
1097 + Closes: #121978, #57828
1098 + + include all tex-files in the doc. Closes: #107117
1099 + * get straight with the kernel. Closes: #186808
1100 + * add header files and libnetlink to new development package.
1101 + Closes: #128162, #139309
1102 + * build-depend on libatm1-dev | atm-dev instead of atm-dev
1103 +
1104 + -- Andreas Barth <aba@not.so.argh.org> Sun, 28 Nov 2004 01:07:30 +0000
1105 +
1106 +iproute (20041019-0.2) unstable; urgency=low
1107 +
1108 + * NMU, uploading to unstable.
1109 +
1110 + -- Andreas Barth <aba@not.so.argh.org> Mon, 22 Nov 2004 19:43:17 +0200
1111 +
1112 +iproute (20041019-0.1) experimental; urgency=low
1113 +
1114 + * NMU, fixing only most urgent issues.
1115 + * New upstream package, fixes:
1116 + + compatibility with 2.6.7 and above. Closes: #262698
1117 + + no longer with netinet/in.h. Closes: #221877
1118 +
1119 + -- Andreas Barth <aba@not.so.argh.org> Mon, 8 Nov 2004 07:50:35 +0100
1120 +
1121 +iproute (20010824-13.1) unstable; urgency=high
1122 +
1123 + * NMU for a security fix.
1124 + * [CAN-2003-0856] Fix a local denial of service vulnerability via
1125 + spoofed messages to the kernel's Netlink interface. (Closes: #242994)
1126 +
1127 + -- Joshua Kwan <joshk@triplehelix.org> Sun, 16 May 2004 20:28:43 -0700
1128 +
1129 +iproute (20010824-13) unstable; urgency=low
1130 +
1131 + * debian/rules: Run dpkg-shlibdeps with all the executables,
1132 + to fix dependency problem (closes: Bug#224063)
1133 + * Really removed references to obsolete include files
1134 + (Bug#223165 was not fixed properly)
1135 +
1136 + -- Juan Cespedes <cespedes@debian.org> Sun, 25 Jan 2004 23:04:20 +0100
1137 +
1138 +iproute (20010824-12) unstable; urgency=low
1139 +
1140 + * Updated README.Debian and copyright file
1141 + * Added two new manpages from http://lartc.org/manpages/:
1142 + ip(8) and tc-cbq-details(8).
1143 + * Removed references to obsolete include files which made
1144 + compilation fail (closes: Bug#223165)
1145 +
1146 + -- Juan Cespedes <cespedes@debian.org> Sun, 14 Dec 2003 00:40:10 +0100
1147 +
1148 +iproute (20010824-11) unstable; urgency=low
1149 +
1150 + * Changed priority to "optional"
1151 + * Fixed "tc -s qdisc" on sparc (patch by "Nicolas S. Dade"
1152 + <ndade@nsd.dyndns.org>) (closes: Bug#194128)
1153 +
1154 + -- Juan Cespedes <cespedes@debian.org> Sun, 17 Aug 2003 00:22:47 +0200
1155 +
1156 +iproute (20010824-10) unstable; urgency=low
1157 +
1158 + * Updated manual pages from http://www.lartc.org/manpages/
1159 + (closes: Bug#156353, Bug#175313, Bug#176989, Bug#189095)
1160 + * New Standards-Version
1161 + * Don't "rm -rf /etc/iproute2" on purge (closes: Bug#202862)
1162 + * Include "iproute2" in the description (closes: Bug#182999)
1163 +
1164 + -- Juan Cespedes <cespedes@debian.org> Sat, 16 Aug 2003 18:29:27 +0200
1165 +
1166 +iproute (20010824-9) unstable; urgency=medium
1167 +
1168 + * Added patch for HTB v3.6 to be able to work with kernel 2.4.20
1169 + (from http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz)
1170 + (closes: Bug#147550, Bug#167149, Bug#167597, Bug#171277)
1171 +
1172 + -- Juan Cespedes <cespedes@debian.org> Thu, 05 Dec 2002 13:44:10 +0100
1173 +
1174 +iproute (20010824-8) unstable; urgency=medium
1175 +
1176 + * Added support for HTB queuing discipline (closes: Bug#133381)
1177 + NOTE: you need a patched kernel in order to use it
1178 +
1179 + -- Juan Cespedes <cespedes@debian.org> Tue, 2 Apr 2002 20:29:40 +0200
1180 +
1181 +iproute (20010824-7) unstable; urgency=medium
1182 +
1183 + * Move `ip' binary to /bin to fix FHS violation (closes: Bug#134812)
1184 +
1185 + -- Juan Cespedes <cespedes@debian.org> Mon, 4 Mar 2002 00:20:30 +0100
1186 +
1187 +iproute (20010824-6) unstable; urgency=low
1188 +
1189 + * Added a couple of #ifdef's to be able to compile with older
1190 + kernel headers (needed for arm) (closes: Bug#131695)
1191 +
1192 + -- Juan Cespedes <cespedes@debian.org> Sat, 16 Feb 2002 19:27:15 +0100
1193 +
1194 +iproute (20010824-5) unstable; urgency=low
1195 +
1196 + * Really fix Bug#121589 (dead gateway bug); apparently I
1197 + forgot to include the patch in 20010824-2
1198 +
1199 + -- Juan Cespedes <cespedes@debian.org> Tue, 29 Jan 2002 23:22:24 +0100
1200 +
1201 +iproute (20010824-4) unstable; urgency=low
1202 +
1203 + * Added support for DIFFSERV and ATM in tc
1204 +
1205 + -- Juan Cespedes <cespedes@debian.org> Sun, 13 Jan 2002 03:01:47 +0100
1206 +
1207 +iproute (20010824-3) unstable; urgency=low
1208 +
1209 + * Updated tc* man pages (thanks to bert hubert <ahu@ds9a.nl>)
1210 + * Fixed spurious space in `tc -s qdisc' output (closes: Bug#128501)
1211 +
1212 + -- Juan Cespedes <cespedes@debian.org> Thu, 10 Jan 2002 22:18:25 +0100
1213 +
1214 +iproute (20010824-2) unstable; urgency=low
1215 +
1216 + * Fixed the following important and serious bugs:
1217 + + iproute doesn't compile on Alpha (closes: Bug#118113, Bug#123224)
1218 + + iproute doesn't compile on MIPS (closes: Bug#118424)
1219 + + iproute doesn't compile on powerpc (closes: Bug#119601)
1220 + * Added man pages for tc (closes: Bug#124230), tc-cbq, tc-red, tc-tbf,
1221 + tc-prio and tc-sfq
1222 + * Removed references to old programs from iproute(7) (closes: Bug#99536)
1223 + * Fixed bug which presented first hop as dead in equal cost multipath
1224 + (closes: Bug#121589)
1225 + * Do not process .ps with through `psnup' (closes: Bug#119820)
1226 +
1227 + -- Juan Cespedes <cespedes@debian.org> Tue, 8 Jan 2002 16:07:27 +0100
1228 +
1229 +iproute (20010824-1) unstable; urgency=low
1230 +
1231 + * New upstream version
1232 + * Make ingress qdisc work again with tc (closes: Bug#84444)
1233 + * Make it compile properly with new include files (closes: Bug#113112)
1234 +
1235 + -- Juan Cespedes <cespedes@debian.org> Sun, 28 Oct 2001 16:38:00 +0100
1236 +
1237 +iproute (20001007-1) unstable; urgency=low
1238 +
1239 + * New upstream version (closes: Bug#63701)
1240 + * Remove /etc/iproute2 on purge (closes: Bug#72743)
1241 + * Fixed Lintian warnings (no-priority-field and no-section-field)
1242 +
1243 + -- Juan Cespedes <cespedes@debian.org> Sat, 14 Oct 2000 19:27:12 +0200
1244 +
1245 +iproute (991023-2) unstable; urgency=low
1246 +
1247 + * New Standards-Version (3.1.1) (closes: Bug#47923)
1248 + * Modified description of package to show which kernel options are
1249 + necessary to use the package (closes: Bug#47922)
1250 + * Updated manual page to point at /usr/share/doc/iproute (closes: Bug#47924)
1251 +
1252 + -- Juan Cespedes <cespedes@debian.org> Sun, 19 Dec 1999 04:00:21 +0100
1253 +
1254 +iproute (991023-1) unstable; urgency=low
1255 +
1256 + * New upstream version (closes: Bug#48733)
1257 +
1258 + -- Juan Cespedes <cespedes@debian.org> Tue, 2 Nov 1999 16:29:37 +0100
1259 +
1260 +iproute (990824-1) unstable; urgency=low
1261 +
1262 + * New maintainer
1263 + * New upstream version
1264 + * New Standards-Version: 3.1.0
1265 + * Minor fix in "ip rule list": mask in "from" address was not shown
1266 + correctly
1267 + * Removed obsoleted documentation from "debian/" directory
1268 +
1269 + -- Juan Cespedes <cespedes@debian.org> Sun, 24 Oct 1999 19:02:56 +0200
1270 +
1271 +iproute (990630-1) unstable; urgency=low
1272 +
1273 + * New upstream version.
1274 + * FHS and standards 3.0.1.0.
1275 +
1276 + -- Roberto Lumbreras <rover@debian.org> Tue, 3 Aug 1999 02:49:28 +0200
1277 +
1278 +iproute (990530-1) unstable; urgency=low
1279 +
1280 + * New upstream version.
1281 + * Build with 2.2.10 kernel headers.
1282 + * Install new scripts ip/routef ip/routel, but not ip/ifcfg ip/rtpr by
1283 + now, I don't know who/what needs rtpr; ifcfg uses arping, and it isn't
1284 + available in debian for now.
1285 +
1286 + -- Roberto Lumbreras <rover@debian.org> Tue, 22 Jun 1999 02:28:53 +0200
1287 +
1288 +iproute (990329-1) unstable; urgency=low
1289 +
1290 + * New upstream version.
1291 + * Build with 2.2.5 kernel headers.
1292 +
1293 + -- Roberto Lumbreras <rover@debian.org> Sun, 4 Apr 1999 18:50:39 +0200
1294 +
1295 +iproute (980630-1) unstable; urgency=low
1296 +
1297 + * New upstream version.
1298 + * Build with 2.1.112 kernel headers.
1299 + * Rewrote the rules file.
1300 +
1301 + -- Roberto Lumbreras <rover@debian.org> Wed, 29 Jul 1998 23:37:52 +0200
1302 +
1303 +iproute (980119-1) unstable; urgency=low
1304 +
1305 + * Outdated documentation. Upstream docs are scarce.
1306 + * Non-Maintainer release
1307 + * This package has no correct copyright file!
1308 + * Include all the README.* docs from the upstream site.
1309 + * Modified to build under glibc
1310 + * Build with 2.1.85 kernel headers.
1311 + * produce a correct diff.
1312 + * Reworked the rules file to utilize debmake fully
1313 + * Newest upstream release
1314 + * glibc compilation
1315 +
1316 + -- Christoph Lameter <christoph@lameter.com> Wed, 4 Feb 1998 13:37:28 -0800
1317 +
1318 +iproute (961225-2) unstable frozen; urgency=low
1319 +
1320 + * Added a man page for iproute. (Fixes #8080).
1321 + * Removed out-of-date patches.
1322 + * Added routing.txt from /usr/src/linux/Documentation/networking/routing.txt
1323 + * Newer version of debmake.
1324 +
1325 + -- Tom Lees <tom@lpsg.demon.co.uk> Mon, 17 Apr 1997 17:00:36 +0100
1326 +
1327 +iproute (961225-1) unstable; urgency=low
1328 +
1329 + * Initial Release.
1330 +
1331 + -- Tom Lees <tom@lpsg.demon.co.uk> Mon, 30 Dec 1996 11:12:23 +0000
1332 +
1333 +Local variables:
1334 +mode: debian-changelog
1335 +End:
1336 --- iproute-20071016.orig/debian/iproute.install
1337 +++ iproute-20071016/debian/iproute.install
1338 @@ -0,0 +1,8 @@
1339 +ip/ip /bin
1340 +ip/rtmon tc/tc misc/rtacct misc/ss /sbin
1341 +misc/lnstat misc/nstat /usr/bin/
1342 +ip/routef ip/routel /usr/bin
1343 +etc/* /etc
1344 +tc/*.so /usr/lib/tc
1345 +misc/arpd /usr/sbin
1346 +netem/*.dist /usr/lib/tc
1347 --- iproute-20071016.orig/debian/patches/fix_ss_typo.dpatch
1348 +++ iproute-20071016/debian/patches/fix_ss_typo.dpatch
1349 @@ -0,0 +1,19 @@
1350 +#! /bin/sh /usr/share/dpatch/dpatch-run
1351 +## fix_ss_typo.dpatch by <formorer@lisa.springfield.lan>
1352 +##
1353 +## All lines beginning with `## DP:' are a description of the patch.
1354 +## DP: No description.
1355 +
1356 +@DPATCH@
1357 +diff -urNad iproute-20070313~/man/man8/ss.8 iproute-20070313/man/man8/ss.8
1358 +--- iproute-20070313~/man/man8/ss.8 2007-03-13 22:50:56.000000000 +0100
1359 ++++ iproute-20070313/man/man8/ss.8 2007-06-10 19:36:04.000000000 +0200
1360 +@@ -9,7 +9,7 @@
1361 + is used to dump socket statistics. It allows showing information similar
1362 + to
1363 + .IR netstat .
1364 +-It can display more TCP information than state than other tools.
1365 ++It can display more TCP and state informations than other tools.
1366 +
1367 + .SH OPTIONS
1368 + These programs follow the usual GNU command line syntax, with long
1369 --- iproute-20071016.orig/debian/patches/00list
1370 +++ iproute-20071016/debian/patches/00list
1371 @@ -0,0 +1,12 @@
1372 +ip.8-typo
1373 +wrr-qdisc.dpatch
1374 +manpages-typo.dpatch
1375 +ip_address
1376 +tc_modules.dpatch
1377 +moo.dpatch
1378 +ip_route_usage.dpatch
1379 +tc_cbq_details_typo.dpatch
1380 +libnetlink_typo.dpatch
1381 +tcb_htb_typo.dpatch
1382 +fix_ss_typo.dpatch
1383 +remove_tc_filters_reference.dpatch
1384 --- iproute-20071016.orig/debian/patches/libnetlink_typo.dpatch
1385 +++ iproute-20071016/debian/patches/libnetlink_typo.dpatch
1386 @@ -0,0 +1,19 @@
1387 +#! /bin/sh /usr/share/dpatch/dpatch-run
1388 +## libnetlink_typo.dpatch by <formorer@lisa.springfield.lan>
1389 +##
1390 +## All lines beginning with `## DP:' are a description of the patch.
1391 +## DP: No description.
1392 +
1393 +@DPATCH@
1394 +diff -urNad iproute-20070313~/man/man3/libnetlink.3 iproute-20070313/man/man3/libnetlink.3
1395 +--- iproute-20070313~/man/man3/libnetlink.3 2007-03-13 22:50:56.000000000 +0100
1396 ++++ iproute-20070313/man/man3/libnetlink.3 2007-06-10 19:28:30.000000000 +0200
1397 +@@ -187,7 +187,7 @@
1398 + This library should be named librtnetlink.
1399 +
1400 + .SH AUTHORS
1401 +-netlink/rtnetlink was designed and writen by Alexey Kuznetsov.
1402 ++netlink/rtnetlink was designed and written by Alexey Kuznetsov.
1403 + Andi Kleen wrote the man page.
1404 +
1405 + .SH SEE ALSO
1406 --- iproute-20071016.orig/debian/patches/add-metrics.diff
1407 +++ iproute-20071016/debian/patches/add-metrics.diff
1408 @@ -0,0 +1,97 @@
1409 +#! /bin/sh -e
1410 +##
1411 +## All lines beginning with `## DP:' are a description of the patch.
1412 +## DP: show the \ really, see #285507
1413 +
1414 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
1415 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
1416 +
1417 +if [ $# -ne 1 ]; then
1418 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
1419 + exit 1
1420 +fi
1421 +case "$1" in
1422 + -patch) patch $patch_opts -p1 < $0;;
1423 + -unpatch) patch $patch_opts -p1 -R < $0;;
1424 + *)
1425 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
1426 + exit 1;;
1427 +esac
1428 +
1429 +exit 0
1430 +@DPATCH@
1431 +--- iproute-20010824/ip/iproute.c
1432 ++++ iproute-20010824/ip/iproute.c
1433 +@@ -57,7 +57,7 @@
1434 + fprintf(stderr, "OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ]\n");
1435 + fprintf(stderr, " [ rtt NUMBER ] [ rttvar NUMBER ]\n");
1436 + fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ ssthresh REALM ]\n");
1437 +- fprintf(stderr, " [ realms REALM ]\n");
1438 ++ fprintf(stderr, " [ realms REALM ] [ hoplimit NUMBER ] [ initcwnd NUMBER ]\n");
1439 + fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n");
1440 + fprintf(stderr, " unreachable | prohibit | blackhole | nat ]\n");
1441 + fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n");
1442 +@@ -481,6 +481,8 @@
1443 + "cwnd",
1444 + "advmss",
1445 + "reordering",
1446 ++ "hoplimit",
1447 ++ "initcwnd",
1448 + };
1449 + static int hz;
1450 + if (mxrta[i] == NULL)
1451 +@@ -750,6 +752,30 @@
1452 + invarg("\"reordering\" value is invalid\n", *argv);
1453 + rta_addattr32(mxrta, sizeof(mxbuf), RTAX_REORDERING, reord);
1454 + #endif
1455 ++#ifdef RTAX_HOPLIMIT
1456 ++ } else if (strcmp(*argv, "hoplimit") == 0) {
1457 ++ unsigned hoplim;
1458 ++ NEXT_ARG();
1459 ++ if (strcmp(*argv, "lock") == 0) {
1460 ++ mxlock |= (1<<RTAX_HOPLIMIT);
1461 ++ NEXT_ARG();
1462 ++ }
1463 ++ if (get_unsigned(&hoplim, *argv, 0))
1464 ++ invarg("\"hoplimit\" value is invalid\n", *argv);
1465 ++ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_HOPLIMIT, hoplim);
1466 ++#endif
1467 ++#ifdef RTAX_INITCWND
1468 ++ } else if (strcmp(*argv, "initcwnd") == 0) {
1469 ++ unsigned initcwnd;
1470 ++ NEXT_ARG();
1471 ++ if (strcmp(*argv, "lock") == 0) {
1472 ++ mxlock |= (1<<RTAX_HOPLIMIT);
1473 ++ NEXT_ARG();
1474 ++ }
1475 ++ if (get_unsigned(&initcwnd, *argv, 0))
1476 ++ invarg("\"initcwnd\" value is invalid\n", *argv);
1477 ++ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_INITCWND, initcwnd);
1478 ++#endif
1479 + } else if (strcmp(*argv, "rtt") == 0) {
1480 + unsigned rtt;
1481 + NEXT_ARG();
1482 +--- iproute-20010824.orig/doc/ip-cref.tex
1483 ++++ iproute-20010824/doc/ip-cref.tex
1484 +@@ -1324,2 +1324,15 @@
1485 +
1486 ++\item \verb|hoplimit NUMBER|
1487 ++
1488 ++--- [2.5.74+ only] Hop limit on the path to this destination. If it is not
1489 ++ given, Linux uses the value selected with \verb|sysctl| variable
1490 ++ \verb|net/ipv4/ip_default_ttl|.
1491 ++
1492 ++\item \verb|initcwnd NUMBER|
1493 ++
1494 ++--- [2.5.70+ only] Initial congestion window size when establishing
1495 ++ connections to this destination. This value is multiplied with the
1496 ++ MSS (``Maximal Segment Size'') for the connection to get the actual
1497 ++ window size. If it is not given (or set to zero), Linux uses the
1498 ++ values specified in~\cite{RFC2414}.
1499 +
1500 +@@ -2653,2 +2666,5 @@
1501 +
1502 ++\bibitem{RFC2414} M.~Allman, S.~Floyd, C.~Partridge.
1503 ++``Increasing TCP's Initial Window'', RFC-2414.
1504 ++
1505 + \end{thebibliography}
1506 --- iproute-20071016.orig/debian/patches/esfq-support.dpatch
1507 +++ iproute-20071016/debian/patches/esfq-support.dpatch
1508 @@ -0,0 +1,284 @@
1509 +#! /bin/sh /usr/share/dpatch/dpatch-run
1510 +## esfq-support.dpatch by Alexander Wirt <formorer@debian.org>
1511 +##
1512 +## All lines beginning with `## DP:' are a description of the patch.
1513 +## DP: No description.
1514 +
1515 +@DPATCH@
1516 +diff -urNad iproute-20060323~/tc/Makefile iproute-20060323/tc/Makefile
1517 +--- iproute-20060323~/tc/Makefile 2006-09-08 18:57:26.000000000 +0200
1518 ++++ iproute-20060323/tc/Makefile 2006-09-08 18:57:54.000000000 +0200
1519 +@@ -7,6 +7,7 @@
1520 + TCMODULES :=
1521 + TCMODULES += q_fifo.o
1522 + TCMODULES += q_sfq.o
1523 ++TCMODULES += q_esfq.o
1524 + TCMODULES += q_red.o
1525 + TCMODULES += q_prio.o
1526 + TCMODULES += q_tbf.o
1527 +diff -urNad iproute-20060323~/tc/Makefile.orig iproute-20060323/tc/Makefile.orig
1528 +--- iproute-20060323~/tc/Makefile.orig 1970-01-01 01:00:00.000000000 +0100
1529 ++++ iproute-20060323/tc/Makefile.orig 2006-09-08 18:57:26.000000000 +0200
1530 +@@ -0,0 +1,89 @@
1531 ++TCOBJ= tc.o tc_qdisc.o tc_class.o tc_filter.o tc_util.o \
1532 ++ m_police.o m_estimator.o m_action.o m_ematch.o \
1533 ++ emp_ematch.yacc.o emp_ematch.lex.o
1534 ++
1535 ++include ../Config
1536 ++
1537 ++TCMODULES :=
1538 ++TCMODULES += q_fifo.o
1539 ++TCMODULES += q_sfq.o
1540 ++TCMODULES += q_red.o
1541 ++TCMODULES += q_prio.o
1542 ++TCMODULES += q_tbf.o
1543 ++TCMODULES += q_cbq.o
1544 ++TCMODULES += f_rsvp.o
1545 ++TCMODULES += f_u32.o
1546 ++TCMODULES += f_route.o
1547 ++TCMODULES += f_fw.o
1548 ++TCMODULES += f_basic.o
1549 ++TCMODULES += q_dsmark.o
1550 ++TCMODULES += q_gred.o
1551 ++TCMODULES += f_tcindex.o
1552 ++TCMODULES += q_ingress.o
1553 ++TCMODULES += q_hfsc.o
1554 ++TCMODULES += q_htb.o
1555 ++TCMODULES += m_gact.o
1556 ++TCMODULES += m_mirred.o
1557 ++TCMODULES += m_ipt.o
1558 ++TCMODULES += m_pedit.o
1559 ++TCMODULES += p_ip.o
1560 ++TCMODULES += p_icmp.o
1561 ++TCMODULES += p_tcp.o
1562 ++TCMODULES += p_udp.o
1563 ++TCMODULES += em_nbyte.o
1564 ++TCMODULES += em_cmp.o
1565 ++TCMODULES += em_u32.o
1566 ++TCMODULES += em_meta.o
1567 ++
1568 ++TCOBJ += $(TCMODULES)
1569 ++
1570 ++TCLIB := tc_core.o
1571 ++TCLIB += tc_red.o
1572 ++TCLIB += tc_cbq.o
1573 ++TCLIB += tc_estimator.o
1574 ++
1575 ++CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB
1576 ++
1577 ++TCSO :=
1578 ++TCSO += q_netem.so
1579 ++ifeq ($(TC_CONFIG_ATM),y)
1580 ++ TCSO += q_atm.so
1581 ++endif
1582 ++
1583 ++LDLIBS += -L. -ltc -lm -ldl
1584 ++
1585 ++LDFLAGS += -Wl,-export-dynamic
1586 ++
1587 ++YACC := bison
1588 ++LEX := flex
1589 ++
1590 ++%.so: %.c
1591 ++ $(CC) $(CFLAGS) -shared -fpic $< -o $@
1592 ++
1593 ++
1594 ++all: libtc.a tc $(TCSO)
1595 ++
1596 ++tc: $(TCOBJ) $(LIBNETLINK) $(LIBUTIL) $(TCLIB)
1597 ++
1598 ++libtc.a: $(TCLIB)
1599 ++ $(AR) rcs $@ $(TCLIB)
1600 ++
1601 ++install: all
1602 ++ mkdir -p $(DESTDIR)/usr/lib/tc
1603 ++ install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
1604 ++ for i in $(TCSO); \
1605 ++ do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \
1606 ++ done
1607 ++
1608 ++clean:
1609 ++ rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.yacc.h; \
1610 ++ rm -f emp_ematch.yacc.output
1611 ++
1612 ++q_atm.so: q_atm.c
1613 ++ $(CC) $(CFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
1614 ++
1615 ++%.yacc.c: %.y
1616 ++ $(YACC) $(YACCFLAGS) -o $@ $<
1617 ++
1618 ++%.lex.c: %.l
1619 ++ $(LEX) $(LEXFLAGS) -o$@ $<
1620 +diff -urNad iproute-20060323~/tc/q_esfq.c iproute-20060323/tc/q_esfq.c
1621 +--- iproute-20060323~/tc/q_esfq.c 1970-01-01 01:00:00.000000000 +0100
1622 ++++ iproute-20060323/tc/q_esfq.c 2006-09-08 18:57:54.000000000 +0200
1623 +@@ -0,0 +1,169 @@
1624 ++/*
1625 ++ * q_esfq.c ESFQ.
1626 ++ *
1627 ++ * This program is free software; you can redistribute it and/or
1628 ++ * modify it under the terms of the GNU General Public License
1629 ++ * as published by the Free Software Foundation; either version
1630 ++ * 2 of the License, or (at your option) any later version.
1631 ++ *
1632 ++ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
1633 ++ *
1634 ++ * Changes: Alexander Atanasov, <alex@ssi.bg>
1635 ++ * Added depth,limit,divisor,hash_kind options.
1636 ++ */
1637 ++
1638 ++#include <stdio.h>
1639 ++#include <stdlib.h>
1640 ++#include <unistd.h>
1641 ++#include <syslog.h>
1642 ++#include <fcntl.h>
1643 ++#include <math.h>
1644 ++#include <sys/socket.h>
1645 ++#include <netinet/in.h>
1646 ++#include <arpa/inet.h>
1647 ++#include <string.h>
1648 ++
1649 ++#include "utils.h"
1650 ++#include "tc_util.h"
1651 ++
1652 ++static void explain(void)
1653 ++{
1654 ++ fprintf(stderr, "Usage: ... esfq [ perturb SECS ] [ quantum BYTES ] [ depth FLOWS ]\n\t[ divisor HASHBITS ] [ limit PKTS ] [ hash HASHTYPE]\n");
1655 ++ fprintf(stderr,"Where: \n");
1656 ++ fprintf(stderr,"HASHTYPE := { classic | src | dst }\n");
1657 ++}
1658 ++
1659 ++#define usage() return(-1)
1660 ++
1661 ++static int esfq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
1662 ++{
1663 ++ int ok=0;
1664 ++ struct tc_sfq_qopt opt;
1665 ++
1666 ++ memset(&opt, 0, sizeof(opt));
1667 ++
1668 ++ opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
1669 ++
1670 ++ while (argc > 0) {
1671 ++ if (strcmp(*argv, "quantum") == 0) {
1672 ++ NEXT_ARG();
1673 ++ if (get_size(&opt.quantum, *argv)) {
1674 ++ fprintf(stderr, "Illegal \"quantum\"\n");
1675 ++ return -1;
1676 ++ }
1677 ++ ok++;
1678 ++ } else if (strcmp(*argv, "perturb") == 0) {
1679 ++ NEXT_ARG();
1680 ++ if (get_integer(&opt.perturb_period, *argv, 0)) {
1681 ++ fprintf(stderr, "Illegal \"perturb\"\n");
1682 ++ return -1;
1683 ++ }
1684 ++ ok++;
1685 ++ } else if (strcmp(*argv, "depth") == 0) {
1686 ++ NEXT_ARG();
1687 ++ if (get_integer(&opt.flows, *argv, 0)) {
1688 ++ fprintf(stderr, "Illegal \"depth\"\n");
1689 ++ return -1;
1690 ++ }
1691 ++ ok++;
1692 ++ } else if (strcmp(*argv, "divisor") == 0) {
1693 ++ NEXT_ARG();
1694 ++ if (get_integer(&opt.divisor, *argv, 0)) {
1695 ++ fprintf(stderr, "Illegal \"divisor\"\n");
1696 ++ return -1;
1697 ++ }
1698 ++ if(opt.divisor >= 15) {
1699 ++ fprintf(stderr, "Illegal \"divisor\" must be < 15\n");
1700 ++ return -1;
1701 ++ }
1702 ++ opt.divisor=pow(2,opt.divisor);
1703 ++ ok++;
1704 ++ } else if (strcmp(*argv, "limit") == 0) {
1705 ++ NEXT_ARG();
1706 ++ if (get_integer(&opt.limit, *argv, 0)) {
1707 ++ fprintf(stderr, "Illegal \"limit\"\n");
1708 ++ return -1;
1709 ++ }
1710 ++ ok++;
1711 ++ } else if (strcmp(*argv, "hash") == 0) {
1712 ++ NEXT_ARG();
1713 ++ if(strcmp(*argv,"classic") == 0) {
1714 ++ opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
1715 ++ } else
1716 ++ if(strcmp(*argv,"dst") == 0) {
1717 ++ opt.hash_kind= TCA_SFQ_HASH_DST;
1718 ++ } else
1719 ++ if(strcmp(*argv,"src") == 0) {
1720 ++ opt.hash_kind= TCA_SFQ_HASH_SRC;
1721 ++ } else {
1722 ++ fprintf(stderr, "Illegal \"hash\"\n");
1723 ++ explain();
1724 ++ return -1;
1725 ++ }
1726 ++ ok++;
1727 ++ } else if (strcmp(*argv, "help") == 0) {
1728 ++ explain();
1729 ++ return -1;
1730 ++ } else {
1731 ++ fprintf(stderr, "What is \"%s\"?\n", *argv);
1732 ++ explain();
1733 ++ return -1;
1734 ++ }
1735 ++ argc--; argv++;
1736 ++ }
1737 ++
1738 ++ if (ok)
1739 ++ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt));
1740 ++ return 0;
1741 ++}
1742 ++
1743 ++static int esfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
1744 ++{
1745 ++ struct tc_sfq_qopt *qopt;
1746 ++ SPRINT_BUF(b1);
1747 ++
1748 ++ if (opt == NULL)
1749 ++ return 0;
1750 ++
1751 ++ if (RTA_PAYLOAD(opt) < sizeof(*qopt))
1752 ++ return -1;
1753 ++ qopt = RTA_DATA(opt);
1754 ++ fprintf(f, "quantum %s ", sprint_size(qopt->quantum, b1));
1755 ++ if (show_details) {
1756 ++ fprintf(f, "limit %up flows %u/%u ",
1757 ++ qopt->limit, qopt->flows, qopt->divisor);
1758 ++ }
1759 ++ if (qopt->perturb_period)
1760 ++ fprintf(f, "perturb %dsec ", qopt->perturb_period);
1761 ++
1762 ++ fprintf(f,"hash: ");
1763 ++ switch(qopt->hash_kind)
1764 ++ {
1765 ++ case TCA_SFQ_HASH_CLASSIC:
1766 ++ fprintf(f,"classic");
1767 ++ break;
1768 ++ case TCA_SFQ_HASH_DST:
1769 ++ fprintf(f,"dst");
1770 ++ break;
1771 ++ case TCA_SFQ_HASH_SRC:
1772 ++ fprintf(f,"src");
1773 ++ break;
1774 ++ default:
1775 ++ fprintf(f,"Unknown");
1776 ++ }
1777 ++ return 0;
1778 ++}
1779 ++
1780 ++static int esfq_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
1781 ++{
1782 ++ return 0;
1783 ++}
1784 ++
1785 ++
1786 ++struct qdisc_util esfq_util = {
1787 ++ NULL,
1788 ++ "esfq",
1789 ++ esfq_parse_opt,
1790 ++ esfq_print_opt,
1791 ++ esfq_print_xstats,
1792 ++};
1793 --- iproute-20071016.orig/debian/patches/wrr-qdisc.dpatch
1794 +++ iproute-20071016/debian/patches/wrr-qdisc.dpatch
1795 @@ -0,0 +1,479 @@
1796 +#! /bin/sh -e
1797 +##
1798 +## All lines beginning with `## DP:' are a description of the patch.
1799 +## DP: add the wrr qdisc scheduler, see #198414
1800 +
1801 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
1802 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
1803 +
1804 +if [ $# -ne 1 ]; then
1805 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
1806 + exit 1
1807 +fi
1808 +case "$1" in
1809 + -patch) patch $patch_opts -p1 < $0;;
1810 + -unpatch) patch $patch_opts -p1 -R < $0;;
1811 + *)
1812 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
1813 + exit 1;;
1814 +esac
1815 +
1816 +exit 0
1817 +@DPATCH@
1818 +diff -urNad pkg-iproute~/include/linux/pkt_sched.h pkg-iproute/include/linux/pkt_sched.h
1819 +--- pkg-iproute~/include/linux/pkt_sched.h 2007-10-24 16:36:41.000000000 +0200
1820 ++++ pkg-iproute/include/linux/pkt_sched.h 2007-10-24 16:36:56.000000000 +0200
1821 +@@ -475,4 +475,116 @@
1822 +
1823 + #define NETEM_DIST_SCALE 8192
1824 +
1825 ++/* WRR section */
1826 ++
1827 ++/* Other includes */
1828 ++#include <linux/if_ether.h>
1829 ++
1830 ++// A sub weight and of a class
1831 ++// All numbers are represented as parts of (2^64-1).
1832 ++struct tc_wrr_class_weight {
1833 ++ __u64 val; // Current value (0 is not valid)
1834 ++ __u64 decr; // Value pr bytes (2^64-1 is not valid)
1835 ++ __u64 incr; // Value pr seconds (2^64-1 is not valid)
1836 ++ __u64 min; // Minimal value (0 is not valid)
1837 ++ __u64 max; // Minimal value (0 is not valid)
1838 ++
1839 ++// The time where the above information was correct:
1840 ++ time_t tim;
1841 ++};
1842 ++
1843 ++// Packet send when modifying a class:
1844 ++struct tc_wrr_class_modf {
1845 ++ // Not-valid values are ignored.
1846 ++ struct tc_wrr_class_weight weight1;
1847 ++ struct tc_wrr_class_weight weight2;
1848 ++};
1849 ++
1850 ++// Packet returned when quering a class:
1851 ++struct tc_wrr_class_stats {
1852 ++ char used; // If this is false the information below is invalid
1853 ++
1854 ++ struct tc_wrr_class_modf class_modf;
1855 ++
1856 ++ unsigned char addr[ETH_ALEN];
1857 ++ char usemac; // True if addr is a MAC address, else it is an IP address
1858 ++ // (this value is only for convience, it is always the same
1859 ++ // value as in the qdisc)
1860 ++ int heappos; // Current heap position or 0 if not in heap
1861 ++ __u64 penal_ls; // Penalty value in heap (ls)
1862 ++ __u64 penal_ms; // Penalty value in heap (ms)
1863 ++};
1864 ++
1865 ++// Qdisc-wide penalty information (boolean values - 2 not valid)
1866 ++struct tc_wrr_qdisc_weight {
1867 ++ char weight_mode; // 0=No automatic change to weight
1868 ++ // 1=Decrease normally
1869 ++ // 2=Also multiply with number of machines
1870 ++ // 3=Instead multiply with priority divided
1871 ++ // with priority of the other.
1872 ++ // -1=no change
1873 ++};
1874 ++
1875 ++// Packet send when modifing a qdisc:
1876 ++struct tc_wrr_qdisc_modf {
1877 ++ // Not-valid values are ignored:
1878 ++ struct tc_wrr_qdisc_weight weight1;
1879 ++ struct tc_wrr_qdisc_weight weight2;
1880 ++};
1881 ++
1882 ++// Packet send when creating a qdisc:
1883 ++struct tc_wrr_qdisc_crt {
1884 ++ struct tc_wrr_qdisc_modf qdisc_modf;
1885 ++
1886 ++ char srcaddr; // 1=lookup source, 0=lookup destination
1887 ++ char usemac; // 1=Classify on MAC addresses, 0=classify on IP
1888 ++ char usemasq; // 1=Classify based on masqgrading - only valid
1889 ++ // if usemac is zero
1890 ++ int bands_max; // Maximal number of bands (i.e.: classes)
1891 ++ int proxy_maxconn;// If differnt from 0 then we support proxy remapping
1892 ++ // of packets. And this is the number of maximal
1893 ++ // concurrent proxy connections.
1894 ++};
1895 ++
1896 ++// Packet returned when quering a qdisc:
1897 ++struct tc_wrr_qdisc_stats {
1898 ++ struct tc_wrr_qdisc_crt qdisc_crt;
1899 ++ int proxy_curconn;
1900 ++ int nodes_in_heap; // Current number of bands wanting to send something
1901 ++ int bands_cur; // Current number of bands used (i.e.: MAC/IP addresses seen)
1902 ++ int bands_reused; // Number of times this band has been reused.
1903 ++ int packets_requed; // Number of times packets have been requeued.
1904 ++ __u64 priosum; // Sum of priorities in heap where 1 is 2^32
1905 ++};
1906 ++
1907 ++struct tc_wrr_qdisc_modf_std {
1908 ++ // This indicates which of the tc_wrr_qdisc_modf structers this is:
1909 ++ char proxy; // 0=This struct
1910 ++
1911 ++ // Should we also change a class?
1912 ++ char change_class;
1913 ++
1914 ++ // Only valid if change_class is false
1915 ++ struct tc_wrr_qdisc_modf qdisc_modf;
1916 ++
1917 ++ // Only valid if change_class is true:
1918 ++ unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0)
1919 ++ struct tc_wrr_class_modf class_modf; // The change
1920 ++};
1921 ++
1922 ++// Used for proxyrempping:
1923 ++struct tc_wrr_qdisc_modf_proxy {
1924 ++ // This indicates which of the tc_wrr_qdisc_modf structers this is:
1925 ++ char proxy; // 1=This struct
1926 ++
1927 ++ // This is 1 if the proxyremap information should be reset
1928 ++ char reset;
1929 ++
1930 ++ // changec is the number of elements in changes.
1931 ++ int changec;
1932 ++
1933 ++ // This is an array of type ProxyRemapBlock:
1934 ++ long changes[0];
1935 ++};
1936 ++
1937 + #endif
1938 +diff -urNad pkg-iproute~/tc/Makefile pkg-iproute/tc/Makefile
1939 +--- pkg-iproute~/tc/Makefile 2007-10-24 16:36:12.000000000 +0200
1940 ++++ pkg-iproute/tc/Makefile 2007-10-24 16:37:24.000000000 +0200
1941 +@@ -11,6 +11,7 @@
1942 + TCMODULES += q_prio.o
1943 + TCMODULES += q_tbf.o
1944 + TCMODULES += q_cbq.o
1945 ++TCMODULES += q_wrr.o
1946 + TCMODULES += q_rr.o
1947 + TCMODULES += q_netem.o
1948 + TCMODULES += f_rsvp.o
1949 +diff -urNad pkg-iproute~/tc/q_wrr.c pkg-iproute/tc/q_wrr.c
1950 +--- pkg-iproute~/tc/q_wrr.c 1970-01-01 01:00:00.000000000 +0100
1951 ++++ pkg-iproute/tc/q_wrr.c 2007-10-24 16:36:56.000000000 +0200
1952 +@@ -0,0 +1,322 @@
1953 ++#include <stdio.h>
1954 ++#include <stdlib.h>
1955 ++#include <unistd.h>
1956 ++#include <syslog.h>
1957 ++#include <fcntl.h>
1958 ++#include <sys/socket.h>
1959 ++#include <netinet/in.h>
1960 ++#include <arpa/inet.h>
1961 ++#include <string.h>
1962 ++#include <math.h>
1963 ++
1964 ++#include "utils.h"
1965 ++#include "tc_util.h"
1966 ++
1967 ++#define usage() return(-1)
1968 ++
1969 ++// Returns -1 on error
1970 ++static int wrr_parse_qdisc_weight(int argc, char** argv,
1971 ++ struct tc_wrr_qdisc_modf* opt) {
1972 ++ int i;
1973 ++
1974 ++ opt->weight1.weight_mode=-1;
1975 ++ opt->weight2.weight_mode=-1;
1976 ++
1977 ++ for(i=0; i<argc; i++) {
1978 ++ if(!memcmp(argv[i],"wmode1=",7)) {
1979 ++ opt->weight1.weight_mode=atoi(argv[i]+7);
1980 ++ } else if(!memcmp(argv[i],"wmode2=",7)) {
1981 ++ opt->weight2.weight_mode=atoi(argv[i]+7);
1982 ++ } else {
1983 ++ printf("Usage: ... [wmode1=0|1|2|3] [wmode2=0|1|2|3]\n");
1984 ++ return -1;
1985 ++ }
1986 ++ }
1987 ++ return 0;
1988 ++}
1989 ++
1990 ++static int wrr_parse_class_modf(int argc, char** argv,
1991 ++ struct tc_wrr_class_modf* modf) {
1992 ++ int i;
1993 ++
1994 ++ if(argc<1) {
1995 ++ fprintf(stderr, "Usage: ... [weight1=val] [decr1=val] [incr1=val] [min1=val] [max1=val] [val2=val] ...\n");
1996 ++ fprintf(stderr, " The values can be floating point like 0.42 or divisions like 42/100\n");
1997 ++ return -1;
1998 ++ }
1999 ++
2000 ++ // Set meaningless values:
2001 ++ modf->weight1.val=0;
2002 ++ modf->weight1.decr=(__u64)-1;
2003 ++ modf->weight1.incr=(__u64)-1;
2004 ++ modf->weight1.min=0;
2005 ++ modf->weight1.max=0;
2006 ++ modf->weight2.val=0;
2007 ++ modf->weight2.decr=(__u64)-1;
2008 ++ modf->weight2.incr=(__u64)-1;
2009 ++ modf->weight2.min=0;
2010 ++ modf->weight2.max=0;
2011 ++
2012 ++ // And read values:
2013 ++ for(i=0; i<argc; i++) {
2014 ++ char arg[80];
2015 ++ char* name,*value1=0,*value2=0;
2016 ++ long double f_val1,f_val2=1,value;
2017 ++ if(strlen(argv[i])>=sizeof(arg)) {
2018 ++ fprintf(stderr,"Argument too long: %s\n",argv[i]);
2019 ++ return -1;
2020 ++ }
2021 ++ strcpy(arg,argv[i]);
2022 ++
2023 ++ name=strtok(arg,"=");
2024 ++ if(name) value1=strtok(0,"/");
2025 ++ if(value1) value2=strtok(0,"");
2026 ++
2027 ++ if(!value1) {
2028 ++ fprintf(stderr,"No = found in argument: %s\n",argv[i]);
2029 ++ return -1;
2030 ++ }
2031 ++
2032 ++ f_val1=atof(value1);
2033 ++ if(value2) f_val2=atof(value2);
2034 ++
2035 ++ if(f_val2==0) {
2036 ++ fprintf(stderr,"Division by 0\n");
2037 ++ return -1;
2038 ++ }
2039 ++
2040 ++ value=f_val1/f_val2;
2041 ++ if(value>1) value=1;
2042 ++ if(value<0) value=0;
2043 ++ value*=((__u64)-1);
2044 ++
2045 ++ // And find the value set
2046 ++ if(!strcmp(name,"weight1")) modf->weight1.val=value;
2047 ++ else if(!strcmp(name,"decr1")) modf->weight1.decr=value;
2048 ++ else if(!strcmp(name,"incr1")) modf->weight1.incr=value;
2049 ++ else if(!strcmp(name,"min1")) modf->weight1.min=value;
2050 ++ else if(!strcmp(name,"max1")) modf->weight1.max=value;
2051 ++ else if(!strcmp(name,"weight2")) modf->weight2.val=value;
2052 ++ else if(!strcmp(name,"decr2")) modf->weight2.decr=value;
2053 ++ else if(!strcmp(name,"incr2")) modf->weight2.incr=value;
2054 ++ else if(!strcmp(name,"min2")) modf->weight2.min=value;
2055 ++ else if(!strcmp(name,"max2")) modf->weight2.max=value;
2056 ++ else {
2057 ++ fprintf(stderr,"illegal value: %s\n",name);
2058 ++ return -1;
2059 ++ }
2060 ++ }
2061 ++
2062 ++ return 0;
2063 ++}
2064 ++
2065 ++static int wrr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
2066 ++{
2067 ++ if(n->nlmsg_flags & NLM_F_CREATE) {
2068 ++ // This is a create request:
2069 ++ struct tc_wrr_qdisc_crt opt;
2070 ++
2071 ++ int sour,dest,ip,mac,masq;
2072 ++
2073 ++ if(argc<4) {
2074 ++ fprintf(stderr, "Usage: ... wrr sour|dest ip|masq|mac maxclasses proxymaxcon [penalty-setup]\n");
2075 ++ return -1;
2076 ++ }
2077 ++
2078 ++ // Read sour/dest:
2079 ++ memset(&opt,0,sizeof(opt));
2080 ++ sour=!strcmp(argv[0],"sour");
2081 ++ dest=!strcmp(argv[0],"dest");
2082 ++
2083 ++ if(!sour && !dest) {
2084 ++ fprintf(stderr,"sour or dest must be specified\n");
2085 ++ return -1;
2086 ++ }
2087 ++
2088 ++ // Read ip/mac
2089 ++ ip=!strcmp(argv[1],"ip");
2090 ++ mac=!strcmp(argv[1],"mac");
2091 ++ masq=!strcmp(argv[1],"masq");
2092 ++
2093 ++ if(!ip && !mac && !masq) {
2094 ++ fprintf(stderr,"ip, masq or mac must be specified\n");
2095 ++ return -1;
2096 ++ }
2097 ++
2098 ++ opt.srcaddr=sour;
2099 ++ opt.usemac=mac;
2100 ++ opt.usemasq=masq;
2101 ++ opt.bands_max=atoi(argv[2]);
2102 ++
2103 ++ opt.proxy_maxconn=atoi(argv[3]);
2104 ++
2105 ++ // Read weights:
2106 ++ if(wrr_parse_qdisc_weight(argc-4,argv+4,&opt.qdisc_modf)<0) return -1;
2107 ++ if(opt.qdisc_modf.weight1.weight_mode==-1) opt.qdisc_modf.weight1.weight_mode=0;
2108 ++ if(opt.qdisc_modf.weight2.weight_mode==-1) opt.qdisc_modf.weight2.weight_mode=0;
2109 ++
2110 ++ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt));
2111 ++ } else {
2112 ++ struct tc_wrr_qdisc_modf_std opt;
2113 ++ char qdisc,class;
2114 ++
2115 ++ // This is a modify request:
2116 ++ if(argc<1) {
2117 ++ fprintf(stderr,"... qdisc ... or ... class ...\n");
2118 ++ return -1;
2119 ++ }
2120 ++
2121 ++ qdisc=!strcmp(argv[0],"qdisc");
2122 ++ class=!strcmp(argv[0],"class");
2123 ++
2124 ++ if(!qdisc && !class) {
2125 ++ fprintf(stderr,"qdisc or class must be specified\n");
2126 ++ return -1;
2127 ++ }
2128 ++
2129 ++ argc--;
2130 ++ argv++;
2131 ++
2132 ++ opt.proxy=0;
2133 ++
2134 ++ if(qdisc) {
2135 ++ opt.change_class=0;
2136 ++ if(wrr_parse_qdisc_weight(argc, argv, &opt.qdisc_modf)<0) return -1;
2137 ++ } else {
2138 ++ int a0,a1,a2,a3,a4=0,a5=0;
2139 ++
2140 ++ opt.change_class=1;
2141 ++
2142 ++ if(argc<1) {
2143 ++ fprintf(stderr,"... <mac>|<ip>|<masq> ...\n");
2144 ++ return -1;
2145 ++ }
2146 ++ memset(opt.addr,0,sizeof(opt.addr));
2147 ++
2148 ++ if((sscanf(argv[0],"%i.%i.%i.%i",&a0,&a1,&a2,&a3)!=4) &&
2149 ++ (sscanf(argv[0],"%x:%x:%x:%x:%x:%x",&a0,&a1,&a2,&a3,&a4,&a5)!=6)) {
2150 ++ fprintf(stderr,"Wrong format of mac or ip address\n");
2151 ++ return -1;
2152 ++ }
2153 ++
2154 ++ opt.addr[0]=a0; opt.addr[1]=a1; opt.addr[2]=a2;
2155 ++ opt.addr[3]=a3; opt.addr[4]=a4; opt.addr[5]=a5;
2156 ++
2157 ++ if(wrr_parse_class_modf(argc-1, argv+1, &opt.class_modf)<0) return -1;
2158 ++ }
2159 ++
2160 ++ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt));
2161 ++ }
2162 ++ return 0;
2163 ++}
2164 ++
2165 ++static int wrr_parse_copt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n) {
2166 ++ struct tc_wrr_class_modf opt;
2167 ++
2168 ++ memset(&opt,0,sizeof(opt));
2169 ++ if(wrr_parse_class_modf(argc,argv,&opt)<0) return -1;
2170 ++
2171 ++ addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt));
2172 ++ return 0;
2173 ++}
2174 ++
2175 ++static int wrr_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
2176 ++{
2177 ++ struct tc_wrr_qdisc_stats *qopt;
2178 ++
2179 ++ if (opt == NULL)
2180 ++ return 0;
2181 ++
2182 ++ if (RTA_PAYLOAD(opt) < sizeof(*qopt))
2183 ++ return -1;
2184 ++ qopt = RTA_DATA(opt);
2185 ++
2186 ++ fprintf(f,"\n (%s/%s) (maxclasses %i) (usedclasses %i) (reused classes %i)\n",
2187 ++ qopt->qdisc_crt.srcaddr ? "sour" : "dest",
2188 ++ qopt->qdisc_crt.usemac ? "mac" : (qopt->qdisc_crt.usemasq ? "masq" : "ip"),
2189 ++ qopt->qdisc_crt.bands_max,
2190 ++ qopt->bands_cur,
2191 ++ qopt->bands_reused
2192 ++ );
2193 ++
2194 ++ if(qopt->qdisc_crt.proxy_maxconn) {
2195 ++ fprintf(f," (proxy maxcon %i) (proxy curcon %i)\n",
2196 ++ qopt->qdisc_crt.proxy_maxconn,qopt->proxy_curconn);
2197 ++ }
2198 ++
2199 ++ fprintf(f," (waiting classes %i) (packets requeued %i) (priosum: %Lg)\n",
2200 ++ qopt->nodes_in_heap,
2201 ++ qopt->packets_requed,
2202 ++ qopt->priosum/((long double)((__u32)-1))
2203 ++ );
2204 ++
2205 ++ fprintf(f," (wmode1 %i) (wmode2 %i) \n",
2206 ++ qopt->qdisc_crt.qdisc_modf.weight1.weight_mode,
2207 ++ qopt->qdisc_crt.qdisc_modf.weight2.weight_mode);
2208 ++
2209 ++ return 0;
2210 ++}
2211 ++
2212 ++static int wrr_print_copt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) {
2213 ++ struct tc_wrr_class_stats *copt;
2214 ++ long double d=(__u64)-1;
2215 ++
2216 ++ if (opt == NULL) return 0;
2217 ++
2218 ++ if (RTA_PAYLOAD(opt) < sizeof(*copt))
2219 ++ return -1;
2220 ++ copt = RTA_DATA(opt);
2221 ++
2222 ++ if(!copt->used) {
2223 ++ fprintf(f,"(unused)");
2224 ++ return 0;
2225 ++ }
2226 ++
2227 ++ if(copt->usemac) {
2228 ++ fprintf(f,"\n (address: %.2X:%.2X:%.2X:%.2X:%.2X:%.2X)\n",
2229 ++ copt->addr[0],copt->addr[1],copt->addr[2],
2230 ++ copt->addr[3],copt->addr[4],copt->addr[5]);
2231 ++ } else {
2232 ++ fprintf(f,"\n (address: %i.%i.%i.%i)\n",copt->addr[0],copt->addr[1],copt->addr[2],copt->addr[3]);
2233 ++ }
2234 ++
2235 ++ fprintf(f," (total weight: %Lg) (current position: %i) (counters: %u %u : %u %u)\n",
2236 ++ (copt->class_modf.weight1.val/d)*(copt->class_modf.weight2.val/d),
2237 ++ copt->heappos,
2238 ++ (unsigned)(copt->penal_ms>>32),
2239 ++ (unsigned)(copt->penal_ms & 0xffffffffU),
2240 ++ (unsigned)(copt->penal_ls>>32),
2241 ++ (unsigned)(copt->penal_ls & 0xffffffffU)
2242 ++ );
2243 ++
2244 ++ fprintf(f," Pars 1: (weight %Lg) (decr: %Lg) (incr: %Lg) (min: %Lg) (max: %Lg)\n",
2245 ++ copt->class_modf.weight1.val/d,
2246 ++ copt->class_modf.weight1.decr/d,
2247 ++ copt->class_modf.weight1.incr/d,
2248 ++ copt->class_modf.weight1.min/d,
2249 ++ copt->class_modf.weight1.max/d);
2250 ++
2251 ++ fprintf(f," Pars 2: (weight %Lg) (decr: %Lg) (incr: %Lg) (min: %Lg) (max: %Lg)",
2252 ++ copt->class_modf.weight2.val/d,
2253 ++ copt->class_modf.weight2.decr/d,
2254 ++ copt->class_modf.weight2.incr/d,
2255 ++ copt->class_modf.weight2.min/d,
2256 ++ copt->class_modf.weight2.max/d);
2257 ++
2258 ++ return 0;
2259 ++}
2260 ++
2261 ++static int wrr_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
2262 ++{
2263 ++ return 0;
2264 ++}
2265 ++
2266 ++
2267 ++struct qdisc_util wrr_qdisc_util = {
2268 ++ .id = "wrr",
2269 ++ .parse_qopt = wrr_parse_opt,
2270 ++ .print_qopt = wrr_print_opt,
2271 ++ .print_xstats = wrr_print_xstats,
2272 ++ .parse_copt = wrr_parse_copt,
2273 ++ .print_copt = wrr_print_copt
2274 ++};
2275 --- iproute-20071016.orig/debian/patches/remove_tc_filters_reference.dpatch
2276 +++ iproute-20071016/debian/patches/remove_tc_filters_reference.dpatch
2277 @@ -0,0 +1,30 @@
2278 +#! /bin/sh /usr/share/dpatch/dpatch-run
2279 +## remove_tc_filters_reference.dpatch by <formorer@lisa.springfield.lan>
2280 +##
2281 +## All lines beginning with `## DP:' are a description of the patch.
2282 +## DP: No description.
2283 +
2284 +@DPATCH@
2285 +diff -urNad iproute-20070313~/man/man8/tc.8 iproute-20070313/man/man8/tc.8
2286 +--- iproute-20070313~/man/man8/tc.8 2007-06-10 20:22:40.000000000 +0200
2287 ++++ iproute-20070313/man/man8/tc.8 2007-06-10 20:23:16.000000000 +0200
2288 +@@ -202,8 +202,7 @@
2289 + tc filters
2290 + If tc filters are attached to a class, they are consulted first
2291 + for relevant instructions. Filters can match on all fields of a packet header,
2292 +-as well as on the firewall mark applied by ipchains or iptables. See
2293 +-.BR tc-filters (8).
2294 ++as well as on the firewall mark applied by ipchains or iptables.
2295 + .TP
2296 + Type of Service
2297 + Some qdiscs have built in rules for classifying packets based on the TOS field.
2298 +@@ -242,8 +241,7 @@
2299 + .TP
2300 + FILTERS
2301 + Filters have a three part ID, which is only needed when using a hashed
2302 +-filter hierarchy, for which see
2303 +-.BR tc-filters (8).
2304 ++filter hierarchy.
2305 + .SH UNITS
2306 + All parameters accept a floating point number, possibly followed by a unit.
2307 + .P
2308 --- iproute-20071016.orig/debian/patches/tc_sample_fix
2309 +++ iproute-20071016/debian/patches/tc_sample_fix
2310 @@ -0,0 +1,33 @@
2311 +#! /bin/sh -e
2312 +##
2313 +## All lines beginning with `## DP:' are a description of the patch.
2314 +## DP: Fixes #347699
2315 +
2316 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
2317 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
2318 +
2319 +if [ $# -ne 1 ]; then
2320 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2321 + exit 1
2322 +fi
2323 +case "$1" in
2324 + -patch) patch $patch_opts -p1 < $0;;
2325 + -unpatch) patch $patch_opts -p1 -R < $0;;
2326 + *)
2327 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2328 + exit 1;;
2329 +esac
2330 +
2331 +exit 0
2332 +@DPATCH@
2333 +diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
2334 +--- iproute-20051007.keep/tc/f_u32.c 2005-01-19 08:11:58.000000000 +1000
2335 ++++ iproute-20051007/tc/f_u32.c 2006-01-12 17:12:43.000000000 +1000
2336 +@@ -878,6 +878,7 @@
2337 + struct tc_u32_sel sel;
2338 + struct tc_u32_key keys[4];
2339 + } sel2;
2340 ++ memset(&sel2, 0, sizeof(sel2));
2341 + NEXT_ARG();
2342 + if (parse_selector(&argc, &argv, &sel2.sel, n)) {
2343 + fprintf(stderr, "Illegal \"sample\"\n");
2344 --- iproute-20071016.orig/debian/patches/tcb_htb_typo.dpatch
2345 +++ iproute-20071016/debian/patches/tcb_htb_typo.dpatch
2346 @@ -0,0 +1,19 @@
2347 +#! /bin/sh /usr/share/dpatch/dpatch-run
2348 +## tcb_htb_typo.dpatch by <formorer@lisa.springfield.lan>
2349 +##
2350 +## All lines beginning with `## DP:' are a description of the patch.
2351 +## DP: No description.
2352 +
2353 +@DPATCH@
2354 +diff -urNad iproute-20070313~/man/man8/tc-htb.8 iproute-20070313/man/man8/tc-htb.8
2355 +--- iproute-20070313~/man/man8/tc-htb.8 2007-03-13 22:50:56.000000000 +0100
2356 ++++ iproute-20070313/man/man8/tc-htb.8 2007-06-10 19:30:08.000000000 +0200
2357 +@@ -137,7 +137,7 @@
2358 + .SH NOTES
2359 + Due to Unix timing constraints, the maximum ceil rate is not infinite and may in fact be quite low. On Intel,
2360 + there are 100 timer events per second, the maximum rate is that rate at which 'burst' bytes are sent each timer tick.
2361 +-From this, the mininum burst size for a specified rate can be calculated. For i386, a 10mbit rate requires a 12 kilobyte
2362 ++From this, the minimum burst size for a specified rate can be calculated. For i386, a 10mbit rate requires a 12 kilobyte
2363 + burst as 100*12kb*8 equals 10mbit.
2364 +
2365 + .SH SEE ALSO
2366 --- iproute-20071016.orig/debian/patches/ip_route_usage.dpatch
2367 +++ iproute-20071016/debian/patches/ip_route_usage.dpatch
2368 @@ -0,0 +1,19 @@
2369 +#! /bin/sh /usr/share/dpatch/dpatch-run
2370 +## ip_route_usage.dpatch by Alexander Wirt <formorer@debian.org>
2371 +##
2372 +## All lines beginning with `## DP:' are a description of the patch.
2373 +## DP: No description.
2374 +
2375 +@DPATCH@
2376 +diff -urNad pkg-iproute~/ip/iproute.c pkg-iproute/ip/iproute.c
2377 +--- pkg-iproute~/ip/iproute.c 2007-10-18 14:04:18.000000000 +0200
2378 ++++ pkg-iproute/ip/iproute.c 2007-10-18 14:23:11.000000000 +0200
2379 +@@ -72,7 +72,7 @@
2380 + fprintf(stderr, "OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ]\n");
2381 + fprintf(stderr, " [ rtt TIME ] [ rttvar TIME ]\n");
2382 + fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n");
2383 +- fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ]\n");
2384 ++ fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
2385 + fprintf(stderr, " [ rto_min TIME ]\n");
2386 + fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n");
2387 + fprintf(stderr, " unreachable | prohibit | blackhole | nat ]\n");
2388 --- iproute-20071016.orig/debian/patches/manpages-typo.dpatch
2389 +++ iproute-20071016/debian/patches/manpages-typo.dpatch
2390 @@ -0,0 +1,44 @@
2391 +#! /bin/sh /usr/share/dpatch/dpatch-run
2392 +## manpages-typo.dpatch by Alexander Wirt <formorer@debian.org>
2393 +##
2394 +## All lines beginning with `## DP:' are a description of the patch.
2395 +## DP: No description.
2396 +
2397 +@DPATCH@
2398 +diff -urNad iproute-20061002~/man/man8/tc-prio.8 iproute-20061002/man/man8/tc-prio.8
2399 +--- iproute-20061002~/man/man8/tc-prio.8 2006-10-15 17:06:41.000000000 +0200
2400 ++++ iproute-20061002/man/man8/tc-prio.8 2006-10-15 17:10:52.000000000 +0200
2401 +@@ -30,7 +30,7 @@
2402 + On creation with 'tc qdisc add', a fixed number of bands is created. Each
2403 + band is a class, although is not possible to add classes with 'tc qdisc
2404 + add', the number of bands to be created must instead be specified on the
2405 +-commandline attaching PRIO to its root.
2406 ++command line attaching PRIO to its root.
2407 +
2408 + When dequeueing, band 0 is tried first and only if it did not deliver a
2409 + packet does PRIO try band 1, and so onwards. Maximum reliability packets
2410 +@@ -88,7 +88,7 @@
2411 + The four TOS bits (the 'TOS field') are defined as:
2412 +
2413 + .nf
2414 +-Binary Decimcal Meaning
2415 ++Binary Decimal Meaning
2416 + -----------------------------------------
2417 + 1000 8 Minimize delay (md)
2418 + 0100 4 Maximize throughput (mt)
2419 +@@ -125,13 +125,13 @@
2420 +
2421 + The second column contains the value of the relevant
2422 + four TOS bits, followed by their translated meaning. For example, 15 stands
2423 +-for a packet wanting Minimal Montetary Cost, Maximum Reliability, Maximum
2424 ++for a packet wanting Minimal Monetary Cost, Maximum Reliability, Maximum
2425 + Throughput AND Minimum Delay.
2426 +
2427 + The fourth column lists the way the Linux kernel interprets the TOS bits, by
2428 + showing to which Priority they are mapped.
2429 +
2430 +-The last column shows the result of the default priomap. On the commandline,
2431 ++The last column shows the result of the default priomap. On the command line,
2432 + the default priomap looks like this:
2433 +
2434 + 1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1
2435 --- iproute-20071016.orig/debian/patches/tc_modules.dpatch
2436 +++ iproute-20071016/debian/patches/tc_modules.dpatch
2437 @@ -0,0 +1,19 @@
2438 +#! /bin/sh /usr/share/dpatch/dpatch-run
2439 +## tc_modules.dpatch by <formorer@lisa.springfield.lan>
2440 +##
2441 +## All lines beginning with `## DP:' are a description of the patch.
2442 +## DP: No description.
2443 +
2444 +@DPATCH@
2445 +diff -urNad iproute-20070313~/include/iptables.h iproute-20070313/include/iptables.h
2446 +--- iproute-20070313~/include/iptables.h 2007-03-13 22:50:56.000000000 +0100
2447 ++++ iproute-20070313/include/iptables.h 2007-06-10 17:56:38.000000000 +0200
2448 +@@ -5,7 +5,7 @@
2449 + #include "libiptc/libiptc.h"
2450 +
2451 + #ifndef IPT_LIB_DIR
2452 +-#define IPT_LIB_DIR "/usr/local/lib/iptables"
2453 ++#define IPT_LIB_DIR "/lib/iptables"
2454 + #endif
2455 +
2456 + #ifndef IPPROTO_SCTP
2457 --- iproute-20071016.orig/debian/patches/ip_address
2458 +++ iproute-20071016/debian/patches/ip_address
2459 @@ -0,0 +1,34 @@
2460 +#! /bin/sh -e
2461 +##
2462 +## All lines beginning with `## DP:' are a description of the patch.
2463 +## DP: Removed mentioning of "ip address" in the ip output
2464 +
2465 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
2466 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
2467 +
2468 +if [ $# -ne 1 ]; then
2469 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2470 + exit 1
2471 +fi
2472 +case "$1" in
2473 + -patch) patch $patch_opts -p1 < $0;;
2474 + -unpatch) patch $patch_opts -p1 -R < $0;;
2475 + *)
2476 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2477 + exit 1;;
2478 +esac
2479 +
2480 +exit 0
2481 +@DPATCH@
2482 +diff -ruN iproute-20051007.orig/ip/ipaddress.c iproute-20051007/ip/ipaddress.c
2483 +--- iproute-20051007.orig/ip/ipaddress.c 2005-09-21 21:33:18.000000000 +0200
2484 ++++ iproute-20051007/ip/ipaddress.c 2006-03-14 07:26:26.830934712 +0100
2485 +@@ -901,7 +901,7 @@
2486 + return ipaddr_list_or_flush(argc-1, argv+1, 1);
2487 + if (matches(*argv, "help") == 0)
2488 + usage();
2489 +- fprintf(stderr, "Command \"%s\" is unknown, try \"ip address help\".\n", *argv);
2490 ++ fprintf(stderr, "Command \"%s\" is unknown, try \"ip addr help\".\n", *argv);
2491 + exit(-1);
2492 + }
2493 +
2494 --- iproute-20071016.orig/debian/patches/ip.8-typo
2495 +++ iproute-20071016/debian/patches/ip.8-typo
2496 @@ -0,0 +1,33 @@
2497 +#! /bin/sh -e
2498 +##
2499 +## All lines beginning with `## DP:' are a description of the patch.
2500 +## DP: show the \ really, see #285507
2501 +
2502 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
2503 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
2504 +
2505 +if [ $# -ne 1 ]; then
2506 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2507 + exit 1
2508 +fi
2509 +case "$1" in
2510 + -patch) patch $patch_opts -p1 < $0;;
2511 + -unpatch) patch $patch_opts -p1 -R < $0;;
2512 + *)
2513 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2514 + exit 1;;
2515 +esac
2516 +
2517 +exit 0
2518 +@DPATCH@
2519 +--- orig/man/man8/ip.8 2004-10-19 20:49:02.000000000 +0000
2520 ++++ new/man/man8/ip.8 2005-01-05 22:04:12.000000000 +0000
2521 +@@ -374,7 +374,7 @@
2522 + .BR "\-o" , " \-oneline"
2523 + output each record on a single line, replacing line feeds
2524 + with the
2525 +-.B '\'
2526 ++.B '\e\'
2527 + character. This is convenient when you want to count records
2528 + with
2529 + .BR wc (1)
2530 --- iproute-20071016.orig/debian/patches/f_u32
2531 +++ iproute-20071016/debian/patches/f_u32
2532 @@ -0,0 +1,63 @@
2533 +#! /bin/sh -e
2534 +##
2535 +## All lines beginning with `## DP:' are a description of the patch.
2536 +## DP: Fixes the u32 calculation for 2.6 kernel - by Russell Stuart <russell-debian@stuart.id.au>
2537 +
2538 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
2539 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
2540 +
2541 +if [ $# -ne 1 ]; then
2542 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2543 + exit 1
2544 +fi
2545 +case "$1" in
2546 + -patch) patch $patch_opts -p1 < $0;;
2547 + -unpatch) patch $patch_opts -p1 -R < $0;;
2548 + *)
2549 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2550 + exit 1;;
2551 +esac
2552 +
2553 +exit 0
2554 +@DPATCH@
2555 +diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
2556 +--- iproute-20051007.keep/tc/f_u32.c 2006-01-12 17:34:37.000000000 +1000
2557 ++++ iproute-20051007/tc/f_u32.c 2006-02-07 17:10:29.000000000 +1000
2558 +@@ -17,6 +17,7 @@
2559 + #include <syslog.h>
2560 + #include <fcntl.h>
2561 + #include <sys/socket.h>
2562 ++#include <sys/utsname.h>
2563 + #include <netinet/in.h>
2564 + #include <arpa/inet.h>
2565 + #include <string.h>
2566 +@@ -874,6 +875,7 @@
2567 + htid = (handle&0xFFFFF000);
2568 + } else if (strcmp(*argv, "sample") == 0) {
2569 + __u32 hash;
2570 ++ struct utsname utsname;
2571 + struct {
2572 + struct tc_u32_sel sel;
2573 + struct tc_u32_key keys[4];
2574 +@@ -889,8 +891,19 @@
2575 + return -1;
2576 + }
2577 + hash = sel2.sel.keys[0].val&sel2.sel.keys[0].mask;
2578 +- hash ^= hash>>16;
2579 +- hash ^= hash>>8;
2580 ++ uname(&utsname);
2581 ++ if (strncmp(utsname.release, "2.4.", 4) == 0) {
2582 ++ hash ^= hash>>16;
2583 ++ hash ^= hash>>8;
2584 ++ }
2585 ++ else {
2586 ++ __u32 mask = sel2.sel.keys[0].mask;
2587 ++ while (mask && !(mask & 1)) {
2588 ++ mask >>= 1;
2589 ++ hash >>= 1;
2590 ++ }
2591 ++ hash &= 0xFF;
2592 ++ }
2593 + htid = ((hash<<12)&0xFF000)|(htid&0xFFF00000);
2594 + sample_ok = 1;
2595 + continue;
2596 --- iproute-20071016.orig/debian/patches/moo.dpatch
2597 +++ iproute-20071016/debian/patches/moo.dpatch
2598 @@ -0,0 +1,39 @@
2599 +#! /bin/sh /usr/share/dpatch/dpatch-run
2600 +## moo.dpatch by Alexander Wirt <formorer@debian.org>
2601 +##
2602 +## All lines beginning with `## DP:' are a description of the patch.
2603 +## DP: Add moo feature
2604 +
2605 +@DPATCH@
2606 +diff -urNad pkg-iproute~/ip/ip.c pkg-iproute/ip/ip.c
2607 +--- pkg-iproute~/ip/ip.c 2007-10-18 11:48:11.000000000 +0200
2608 ++++ pkg-iproute/ip/ip.c 2007-10-18 14:14:20.000000000 +0200
2609 +@@ -59,6 +59,20 @@
2610 + usage();
2611 + }
2612 +
2613 ++static int do_moo(int argc, char **argv)
2614 ++{
2615 ++
2616 ++fprintf(stderr,
2617 ++"\n"
2618 ++" _ __ ___ ___ ___\n"
2619 ++"| '_ ` _ \\ / _ \\ / _ \\\n"
2620 ++"| | | | | | (_) | (_) |\n"
2621 ++"|_| |_| |_|\\___/ \\___/\n"
2622 ++"\n\n"
2623 ++"P.S. no real cows were harmed for this moo\n");
2624 ++ exit(1);
2625 ++}
2626 ++
2627 + static const struct cmd {
2628 + const char *cmd;
2629 + int (*func)(int argc, char **argv);
2630 +@@ -78,6 +92,7 @@
2631 + { "xfrm", do_xfrm },
2632 + { "mroute", do_multiroute },
2633 + { "help", do_help },
2634 ++ { "moo", do_moo },
2635 + { 0 }
2636 + };
2637 +
2638 --- iproute-20071016.orig/debian/patches/heap_corruptionfix
2639 +++ iproute-20071016/debian/patches/heap_corruptionfix
2640 @@ -0,0 +1,47 @@
2641 +#! /bin/sh -e
2642 +##
2643 +## All lines beginning with `## DP:' are a description of the patch.
2644 +## DP: add references to lartc
2645 +## DP: also drop bogus reference to tc-filters
2646 +
2647 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
2648 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
2649 +
2650 +if [ $# -ne 1 ]; then
2651 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2652 + exit 1
2653 +fi
2654 +case "$1" in
2655 + -patch) patch $patch_opts -p1 < $0;;
2656 + -unpatch) patch $patch_opts -p1 -R < $0;;
2657 + *)
2658 + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
2659 + exit 1;;
2660 +esac
2661 +
2662 +exit 0
2663 +@DPATCH@
2664 +diff -urNad iproute-20041019/tc/normal.c /tmp/dpep.9YHbob/iproute-20041019/tc/normal.c
2665 +--- iproute-20041019/tc/normal.c 2004-10-19 14:49:02.000000000 -0600
2666 ++++ /tmp/dpep.9YHbob/iproute-20041019/tc/normal.c 2005-09-06 15:48:45.000000000 -0600
2667 +@@ -26,7 +26,7 @@
2668 + double x, *table;
2669 + int i, n;
2670 +
2671 +- table = calloc(sizeof(double), TABLESIZE);
2672 ++ table = calloc(TABLESIZE+1, sizeof(double));
2673 + if (!table) {
2674 + fprintf(stderr, "Not enough memory\n");
2675 + return 1;
2676 +diff -urNad iproute-20041019/tc/paretonormal.c /tmp/dpep.9YHbob/iproute-20041019/tc/paretonormal.c
2677 +--- iproute-20041019/tc/paretonormal.c 2004-10-19 14:49:02.000000000 -0600
2678 ++++ /tmp/dpep.9YHbob/iproute-20041019/tc/paretonormal.c 2005-09-06 15:49:01.000000000 -0600
2679 +@@ -54,7 +54,7 @@
2680 + double *table;
2681 + int i,n;
2682 +
2683 +- table = calloc(TABLESIZE, sizeof(double));
2684 ++ table = calloc(TABLESIZE+1, sizeof(double));
2685 + if (!table) {
2686 + fprintf(stderr, "Out of memory!\n");
2687 + exit(1);
2688 --- iproute-20071016.orig/debian/patches/tc_cbq_details_typo.dpatch
2689 +++ iproute-20071016/debian/patches/tc_cbq_details_typo.dpatch
2690 @@ -0,0 +1,19 @@
2691 +#! /bin/sh /usr/share/dpatch/dpatch-run
2692 +## tc_cbq_details_typo.dpatch by <formorer@lisa.springfield.lan>
2693 +##
2694 +## All lines beginning with `## DP:' are a description of the patch.
2695 +## DP: No description.
2696 +
2697 +@DPATCH@
2698 +diff -urNad iproute-20070313~/man/man8/tc-cbq-details.8 iproute-20070313/man/man8/tc-cbq-details.8
2699 +--- iproute-20070313~/man/man8/tc-cbq-details.8 2007-06-10 19:25:18.000000000 +0200
2700 ++++ iproute-20070313/man/man8/tc-cbq-details.8 2007-06-10 19:25:58.000000000 +0200
2701 +@@ -210,7 +210,7 @@
2702 + priority. If found, choose it, and terminate.
2703 + .TP
2704 + (iii)
2705 +-Choose the class at which break out to the fallback algorithm occured. Terminate.
2706 ++Choose the class at which break out to the fallback algorithm occurred. Terminate.
2707 + .P
2708 + The packet is enqueued to the class which was chosen when either algorithm
2709 + terminated. It is therefore possible for a packet to be enqueued *not* at a
2710 --- iproute-20071016.orig/debian/iproute.manpages
2711 +++ iproute-20071016/debian/iproute.manpages
2712 @@ -0,0 +1,2 @@
2713 +man/*/*
2714 +debian/man/*
2715 --- iproute-20071016.orig/debian/iproute-doc.install
2716 +++ iproute-20071016/debian/iproute-doc.install
2717 @@ -0,0 +1 @@
2718 +debian/doc/htb/* /usr/share/doc/iproute-doc/htb
2719 --- iproute-20071016.orig/debian/compat
2720 +++ iproute-20071016/debian/compat
2721 @@ -0,0 +1 @@
2722 +5
2723 --- iproute-20071016.orig/debian/iproute-dev.install
2724 +++ iproute-20071016/debian/iproute-dev.install
2725 @@ -0,0 +1,2 @@
2726 +*/*.h /usr/include/iproute/
2727 +lib/libnetlink.a /usr/lib
2728 --- iproute-20071016.orig/debian/man/rtmon.8
2729 +++ iproute-20071016/debian/man/rtmon.8
2730 @@ -0,0 +1,58 @@
2731 +.TH RTMON 8
2732 +.SH NAME
2733 +rtmon \- listens to and monitors RTnetlink
2734 +.SH SYNOPSIS
2735 +.B rtmon
2736 +.RI "[ options ] file FILE [ all | LISTofOBJECTS ]"
2737 +.SH DESCRIPTION
2738 +This manual page documents briefly the
2739 +.B rtmon
2740 +command.
2741 +.PP
2742 +\fBrtmon\fP is a RTnetlink listener. RTnetlink allows the kernel's routing tables to be read and altered.
2743 +
2744 +rtmon should be started before the first network configuration command is issued. For example if you insert:
2745 +
2746 + rtmon file /var/log/rtmon.log
2747 +
2748 +in a startup script, you will be able to view the full history later.
2749 +Certainly, it is possible to start rtmon at any time. It prepends the history with the state snapshot dumped at the moment of starting.
2750 +.SH OPTIONS
2751 +rtmon supports the following options:
2752 +.TP
2753 +.B \-Version
2754 +Print version and exit.
2755 +.TP
2756 +.B help
2757 +Show summary of options.
2758 +.TP
2759 +.B file FILE [ all | LISTofOBJECTS ]
2760 +Log output to FILE. LISTofOBJECTS is the list of object types that we want to monitor.
2761 +It may contain 'link', 'address', 'route' and 'all'. 'link' specifies the network device, 'address'
2762 +the protocol (IP or IPv6) address on a device, 'route' the routing table entry and 'all' does what the name says.
2763 +.TP
2764 +.B \-family [ inet | inet6 | link | help ]
2765 +Specify protocol family. 'inet' is IPv4, 'inet6' is IPv6, 'link' means that no networking protocol is involved and 'help' prints usage information.
2766 +.TP
2767 +.B \-4
2768 +Use IPv4. Shortcut for -family inet.
2769 +.TP
2770 +.B \-6
2771 +Use IPv6. Shortcut for -family inet6.
2772 +.TP
2773 +.B \-0
2774 +Use a special family identifier meaning that no networking protocol is involved. Shortcut for -family link.
2775 +.SH USAGE EXAMPLES
2776 +.TP
2777 +.B # rtmon file /var/log/rtmon.log
2778 +Log to file /var/log/rtmon.log, then run:
2779 +.TP
2780 +.B # ip monitor file /var/log/rtmon.log
2781 +to display logged output from file.
2782 +.SH SEE ALSO
2783 +.BR ip (8)
2784 +.SH AUTHOR
2785 +rtmon was written by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2786 +.PP
2787 +This manual page was written by Michael Prokop <mika@grml.org>,
2788 +for the Debian project (but may be used by others).
2789 --- iproute-20071016.orig/debian/rules
2790 +++ iproute-20071016/debian/rules
2791 @@ -0,0 +1,45 @@
2792 +#!/usr/bin/make -f
2793 +
2794 +# created by Andreas Barth <aba@not.so.argh.org> 2004
2795 +
2796 +build: build-arch
2797 +
2798 +include /usr/share/dpatch/dpatch.make
2799 +
2800 +clean: clean-patched unpatch
2801 +clean-patched:
2802 + -rm stamp-build
2803 + dh_testdir
2804 + dh_testroot
2805 + dh_clean
2806 + make clean
2807 +
2808 +binary: binary-indep binary-arch
2809 +
2810 +binary-indep build-indep:
2811 +
2812 +binary-arch: build-arch
2813 + dh_testdir
2814 + dh_testroot
2815 + dh_install --fail-missing
2816 + dh_link
2817 + dh_installexamples -p iproute-doc examples/*
2818 + dh_installman
2819 + dh_installdocs
2820 + dh_installchangelogs
2821 + dh_compress
2822 + dh_strip
2823 + dh_fixperms
2824 + dh_installdeb
2825 + dh_shlibdeps -Xq_atm.so
2826 + dh_gencontrol
2827 + dh_md5sums
2828 + dh_builddeb
2829 +
2830 +build-arch: stamp-build
2831 +stamp-build: patch
2832 + $(MAKE) KERNEL_INCLUDE=./include
2833 + $(MAKE) -C doc all txt
2834 + touch stamp-build
2835 +
2836 +.PHONY: build binary binary-arch binary-indep clean
2837 --- iproute-20071016.orig/debian/control
2838 +++ iproute-20071016/debian/control
2839 @@ -0,0 +1,46 @@
2840 +Source: iproute
2841 +Section: net
2842 +Priority: optional
2843 +Maintainer: Alexander Wirt <formorer@debian.org>
2844 +Uploaders: Andreas Barth <aba@not.so.argh.org>, Andreas Henriksson <andreas@fatal.se>
2845 +Homepage: http://www.linux-foundation.org/en/Net:Iproute2
2846 +Vcs-Browser: http://git.debian.org/?p=collab-maint/pkg-iproute.git
2847 +Vcs-Git: git://git.debian.org/git/collab-maint/pkg-iproute.git
2848 +Standards-Version: 3.7.3
2849 +Build-Depends: texlive-latex-base, texlive-latex-recommended, libatm1-dev, bison, libdb-dev, linuxdoc-tools, linux-libc-dev, debhelper (>= 5), lynx, dpatch, flex
2850 +
2851 +Package: iproute
2852 +Architecture: any
2853 +Provides: arpd
2854 +Conflicts: arpd
2855 +Depends: ${shlibs:Depends}
2856 +Recommends: libatm1
2857 +Suggests: iproute-doc
2858 +Description: Professional tools to control the networking in Linux kernels
2859 + This is `iproute', the professional set of tools to control the
2860 + networking behavior in kernels 2.2.x and later.
2861 + .
2862 + At least, the options CONFIG_NETLINK and CONFIG_NETLINK_DEV (or
2863 + CONFIG_RTNETLINK) must be compiled into the running kernel.
2864 + .
2865 + This package is also known as iproute2 upstream and in some
2866 + documentation.
2867 +
2868 +Package: iproute-doc
2869 +Section: doc
2870 +Architecture: all
2871 +Description: Professional tools to control the networking in Linux kernels
2872 + This package contains the documentation for the iproute package.
2873 + .
2874 + iproute is the professional set of tools to control the
2875 + networking behavior in kernels 2.2.x and late
2876 +
2877 +Package: iproute-dev
2878 +Section: libdevel
2879 +Architecture: any
2880 +Description: Development package for iproute
2881 + This package contains the header files and static libs for developing
2882 + iproute additions. iproute is the professional set of tools to control the
2883 + networking behavior in kernels 2.2.x and later.
2884 + .
2885 + You don't need this package unless doing development.
2886 --- iproute-20071016.orig/debian/iproute-doc.docs
2887 +++ iproute-20071016/debian/iproute-doc.docs
2888 @@ -0,0 +1,4 @@
2889 +README* doc/Plan RELNOTES
2890 +doc/*.tex doc/*.dvi doc/*.ps doc/*.sty
2891 +doc/*.txt doc/*.html
2892 +debian/htb/*
2893 --- iproute-20071016.orig/ip/iptunnel.c
2894 +++ iproute-20071016/ip/iptunnel.c
2895 @@ -113,7 +113,7 @@
2896 NEXT_ARG();
2897 p->i_flags |= GRE_KEY;
2898 if (strchr(*argv, '.'))
2899 - p->o_key = get_addr32(*argv);
2900 + p->i_key = get_addr32(*argv);
2901 else {
2902 if (get_unsigned(&uval, *argv, 0)<0) {
2903 fprintf(stderr, "invalid value of \"ikey\"\n");
2904 --- iproute-20071016.orig/ip/iproute.c
2905 +++ iproute-20071016/ip/iproute.c
2906 @@ -780,6 +780,18 @@
2907 invarg("\"reordering\" value is invalid\n", *argv);
2908 rta_addattr32(mxrta, sizeof(mxbuf), RTAX_REORDERING, reord);
2909 #endif
2910 +#ifdef RTAX_HOPLIMIT
2911 + } else if (strcmp(*argv, "hoplimit") == 0) {
2912 + unsigned hoplim;
2913 + NEXT_ARG();
2914 + if (strcmp(*argv, "lock") == 0) {
2915 + mxlock |= (1<<RTAX_HOPLIMIT);
2916 + NEXT_ARG();
2917 + }
2918 + if (get_unsigned(&hoplim, *argv, 0))
2919 + invarg("\"hoplimit\" value is invalid\n", *argv);
2920 + rta_addattr32(mxrta, sizeof(mxbuf), RTAX_HOPLIMIT, hoplim);
2921 +#endif
2922 } else if (strcmp(*argv, "rtt") == 0) {
2923 unsigned rtt;
2924 NEXT_ARG();
2925 --- iproute-20071016.orig/ip/ipaddress.c
2926 +++ iproute-20071016/ip/ipaddress.c
2927 @@ -34,6 +34,8 @@
2928 #include "ll_map.h"
2929 #include "ip_common.h"
2930
2931 +#define MAX_ROUNDS 10
2932 +
2933 static struct
2934 {
2935 int ifindex;
2936 @@ -667,7 +669,7 @@
2937 filter.flushp = 0;
2938 filter.flushe = sizeof(flushb);
2939
2940 - for (;;) {
2941 + while (round < MAX_ROUNDS) {
2942 if (rtnl_wilddump_request(&rth, filter.family, RTM_GETADDR) < 0) {
2943 perror("Cannot send dump request");
2944 exit(1);
2945 @@ -694,6 +696,8 @@
2946 fflush(stdout);
2947 }
2948 }
2949 + fprintf(stderr, "*** Flush remains incomplete after %d rounds. ***\n", MAX_ROUNDS); fflush(stderr);
2950 + return 1;
2951 }
2952
2953 if (filter.family != AF_PACKET) {
2954 --- iproute-20071016.orig/ip/iplink.c
2955 +++ iproute-20071016/ip/iplink.c
2956 @@ -107,7 +107,8 @@
2957 {
2958 struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(n);
2959
2960 - if (n->nlmsg_type == NLMSG_ERROR && err->error == -EOPNOTSUPP)
2961 + if (n->nlmsg_type == NLMSG_ERROR &&
2962 + (err->error == -EOPNOTSUPP || err->error == -EINVAL))
2963 have_rtnl_newlink = 0;
2964 else
2965 have_rtnl_newlink = 1;
2966 --- iproute-20071016.orig/Makefile
2967 +++ iproute-20071016/Makefile
2968 @@ -56,6 +56,7 @@
2969 ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/rtstat.8
2970 ln -sf lnstat.8 $(DESTDIR)$(MANDIR)/man8/ctstat.8
2971 ln -sf rtacct.8 $(DESTDIR)$(MANDIR)/man8/nstat.8
2972 + ln -sf routel.8 $(DESTDIR)$(MANDIR)/man8/routef.8
2973 install -m 0755 -d $(DESTDIR)$(MANDIR)/man3
2974 install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3
2975
2976 --- iproute-20071016.orig/man/man8/ip.8
2977 +++ iproute-20071016/man/man8/ip.8
2978 @@ -32,7 +32,7 @@
2979 .br
2980 .BR promisc " { " on " | " off " } |"
2981 .br
2982 -.BR allmulti " { " on " | " off " } |"
2983 +.BR allmulticast " { " on " | " off " } |"
2984 .br
2985 .BR dynamic " { " on " | " off " } |"
2986 .br
2987 @@ -1568,10 +1568,12 @@
2988 set
2989 .I unique
2990 priority value.
2991 +The options preference and order are synonyms with priority.
2992
2993 .TP
2994 .BI table " TABLEID"
2995 the routing table identifier to lookup if the rule selector matches.
2996 +It is also possible to use lookup instead of table.
2997
2998 .TP
2999 .BI realms " FROM/TO"
3000 @@ -1589,6 +1591,7 @@
3001 routes) or a local host address (or even zero).
3002 In the last case the router does not translate the packets, but
3003 masquerades them to this address.
3004 +Using map-to instead of nat means the same thing.
3005
3006 .B Warning:
3007 Changes to the RPDB made with these commands do not become active
3008 @@ -1601,6 +1604,7 @@
3009
3010 .SS ip rule show - list rules
3011 This command has no arguments.
3012 +The options list or lst are synonyms with show.
3013
3014 .SH ip maddress - multicast addresses management
3015
3016 --- iproute-20071016.orig/man/man8/ss.8
3017 +++ iproute-20071016/man/man8/ss.8
3018 @@ -107,7 +107,7 @@
3019 .B ss -o state established '( dport = :ssh or sport = :ssh )'
3020 Display all established ssh connections.
3021 .TP
3022 -.B ss -x src \"/tmp/.X11-unix/*\"
3023 +.B ss -x src /tmp/.X11-unix/*
3024 Find all local processes connected to X server.
3025 .TP
3026 .B ss -o state fin-wait-1 '( sport = :http or sport = :https )' dst 193.233.7/24
3027 --- iproute-20071016.orig/man/man8/routel.8
3028 +++ iproute-20071016/man/man8/routel.8
3029 @@ -0,0 +1,32 @@
3030 +.TH "ROUTEL" "8" "3 Jan, 2008" "iproute2" "Linux"
3031 +.SH "NAME"
3032 +.LP
3033 +routel \- list routes with pretty output format
3034 +.br
3035 +routef \- flush routes
3036 +.SH "SYNTAX"
3037 +.LP
3038 +routel [\fItablenr\fP [\fIraw ip args...\fP]]
3039 +.br
3040 +routef
3041 +.SH "DESCRIPTION"
3042 +.LP
3043 +These programs are a set of helper scripts you can use instead of raw iproute2 commands.
3044 +.br
3045 +The routel script will list routes in a format that some might consider easier to interpret then the ip route list equivalent.
3046 +.br
3047 +The routef script does not take any arguments and will simply flush the routing table down the drain. Beware! This means deleting all routes which will make your network unusable!
3048 +
3049 +.SH "FILES"
3050 +.LP
3051 +\fI/usr/bin/routef\fP
3052 +.br
3053 +\fI/usr/bin/routel\fP
3054 +.SH "AUTHORS"
3055 +.LP
3056 +The routel script was written by Stephen R. van den Berg <srb@cuci.nl>, 1999/04/18 and donated to the public domain.
3057 +.br
3058 +This manual page was written by Andreas Henriksson <andreas@fatal.se>, for the Debian GNU/Linux system.
3059 +.SH "SEE ALSO"
3060 +.LP
3061 +ip(8)