~ubuntu-branches/ubuntu/raring/iproute/raring

« back to all changes in this revision

Viewing changes to debian/patches/hoplimit.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt, Andreas Henriksson, Justin B Rye, Alexander Wirt
  • Date: 2008-05-11 11:18:29 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080511111829-rfewew7s6kiev0bh
Tags: 20080417-1
[ Andreas Henriksson ]
* New upstream release, v2.6.25 a.k.a. snapshot 20080417.
  - Initial documentation for xfrm (Partially fixes #451337)
  - Fixes manpage error caught by lintian!
* Fix typos (syntax error) in ip(8) manpage.
  - Introduced by upstream, caught by lintian yet again!
* Don't ship useless headers in iproute-dev (Closes: #467557)
* Cherry-pick "Fix bad hash calculation because of signed address" from
  upstream. (Closes: #480173)

[ Justin B Rye ]
* Update package description (Closes: #464521)

[ Alexander Wirt ]
* Fix typo in short package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## hoplimit.dpatch by Andreas Henriksson <andreas@fatal.se>
 
3
## Original author unknown, split out from a direct source edit.
 
4
##
 
5
## All lines beginning with `## DP:' are a description of the patch.
 
6
## DP: Add implementation for hoplimit option.
 
7
 
 
8
@DPATCH@
 
9
diff -urNad pkg-iproute~/doc/ip-cref.tex pkg-iproute/doc/ip-cref.tex
 
10
--- pkg-iproute~/doc/ip-cref.tex        2008-01-09 21:32:40.000000000 +0100
 
11
+++ pkg-iproute/doc/ip-cref.tex 2008-01-09 21:34:21.000000000 +0100
 
12
@@ -1315,6 +1315,19 @@
 
13
     If it is not given, Linux uses the value selected with \verb|sysctl|
 
14
     variable \verb|net/ipv4/tcp_reordering|.
 
15
 
 
16
+\item \verb|hoplimit NUMBER|
 
17
+
 
18
+--- [2.5.74+ only] Hop limit on the path to this destination. If it is not
 
19
+    given, Linux uses the value selected with \verb|sysctl| variable
 
20
+    \verb|net/ipv4/ip_default_ttl|.
 
21
+
 
22
+\item \verb|initcwnd NUMBER|
 
23
+
 
24
+--- [2.5.70+ only] Initial congestion window size when establishing
 
25
+    connections to this destination. This value is multiplied with the
 
26
+    MSS (``Maximal Segment Size'') for the connection to get the actual
 
27
+    window size. If it is not given (or set to zero), Linux uses the
 
28
+    values specified in~\cite{RFC2414}.
 
29
 
 
30
 
 
31
 \item \verb|nexthop NEXTHOP|
 
32
@@ -2644,6 +2657,9 @@
 
33
 \bibitem{RFC-DHCP} R.~Droms.
 
34
 ``Dynamic Host Configuration Protocol.'', RFC-2131
 
35
 
 
36
+\bibitem{RFC2414}  M.~Allman, S.~Floyd, C.~Partridge.
 
37
+``Increasing TCP's Initial Window'', RFC-2414.
 
38
+
 
39
 \end{thebibliography}
 
40
 
 
41
 
 
42
diff -urNad pkg-iproute~/ip/iproute.c pkg-iproute/ip/iproute.c
 
43
--- pkg-iproute~/ip/iproute.c   2008-01-09 21:32:40.000000000 +0100
 
44
+++ pkg-iproute/ip/iproute.c    2008-01-09 21:34:21.000000000 +0100
 
45
@@ -70,8 +70,8 @@
 
46
        fprintf(stderr, "INFO_SPEC := NH OPTIONS FLAGS [ nexthop NH ]...\n");
 
47
        fprintf(stderr, "NH := [ via ADDRESS ] [ dev STRING ] [ weight NUMBER ] NHFLAGS\n");
 
48
        fprintf(stderr, "OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ]\n");
 
49
-       fprintf(stderr, "           [ rtt TIME ] [ rttvar TIME ]\n");
 
50
-       fprintf(stderr, "           [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n");
 
51
+       fprintf(stderr, "           [ rtt TIME ] [ rttvar TIME ] [ window NUMBER]\n");
 
52
+       fprintf(stderr, "           [ cwnd NUMBER ] [ hoplimit NUMBER ] [ initcwnd NUMBER ]\n");
 
53
        fprintf(stderr, "           [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
 
54
        fprintf(stderr, "           [ rto_min TIME ]\n");
 
55
        fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n");
 
56
@@ -780,6 +780,18 @@
 
57
                                invarg("\"reordering\" value is invalid\n", *argv);
 
58
                        rta_addattr32(mxrta, sizeof(mxbuf), RTAX_REORDERING, reord);
 
59
 #endif
 
60
+#ifdef RTAX_HOPLIMIT
 
61
+               } else if (matches(*argv, "hoplimit") == 0) {
 
62
+                       unsigned hoplim;
 
63
+                       NEXT_ARG();
 
64
+                       if (strcmp(*argv, "lock") == 0) {
 
65
+                               mxlock |= (1<<RTAX_HOPLIMIT);
 
66
+                               NEXT_ARG();
 
67
+                       }
 
68
+                       if (get_unsigned(&hoplim, *argv, 0))
 
69
+                               invarg("\"hoplimit\" value is invalid\n", *argv);
 
70
+                       rta_addattr32(mxrta, sizeof(mxbuf), RTAX_HOPLIMIT, hoplim);
 
71
+#endif
 
72
                } else if (strcmp(*argv, "rtt") == 0) {
 
73
                        unsigned rtt;
 
74
                        NEXT_ARG();