]> git.pld-linux.org Git - packages/iproute2.git/commitdiff
- 2 upstream patches which fixes tc HTB:
authorSławomir Paszkiewicz <paszczus@pld-linux.org>
Sun, 27 Oct 2013 20:47:16 +0000 (21:47 +0100)
committerSławomir Paszkiewicz <paszczus@pld-linux.org>
Sun, 27 Oct 2013 20:47:16 +0000 (21:47 +0100)
  http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/patch/?id=0a502b21e30be835dcad8d9c6023a41da8709eb1
  http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/patch/?id=734c0ca2cabf96e2ac1abe6e1b0968d0b5b03b11

iproute2-htbupstreamfix.patch [new file with mode: 0644]

diff --git a/iproute2-htbupstreamfix.patch b/iproute2-htbupstreamfix.patch
new file mode 100644 (file)
index 0000000..e322653
--- /dev/null
@@ -0,0 +1,72 @@
+From 0a502b21e30be835dcad8d9c6023a41da8709eb1 Mon Sep 17 00:00:00 2001
+From: Stephen Hemminger <stephen@networkplumber.org>
+Date: Sun, 27 Oct 2013 19:26:47 +0000
+Subject: Fix handling of qdis without options
+
+Some qdisc like htb want the parse_qopt to be called even if no options
+present. Fixes regression caused by:
+
+e9e78b0db0e023035e346ba67de838be851eb665 is the first bad commit
+commit e9e78b0db0e023035e346ba67de838be851eb665
+Author: Stephen Hemminger <stephen@networkplumber.org>
+Date:   Mon Aug 26 08:41:19 2013 -0700
+
+    tc: allow qdisc without options
+---
+diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
+index 3002a56..e304858 100644
+--- a/tc/tc_qdisc.c
++++ b/tc/tc_qdisc.c
+@@ -137,15 +137,16 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
+       if (est.ewma_log)
+               addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est));
+-      if (argc) {
+-              if (q) {
+-                      if (!q->parse_qopt) {
+-                              fprintf(stderr, "qdisc '%s' does not support option parsing\n", k);
+-                              return -1;
+-                      }
++      if (q) {
++              if (q->parse_qopt) {
+                       if (q->parse_qopt(q, argc, argv, &req.n))
+                               return 1;
+-              } else {
++              } else if (argc) {
++                      fprintf(stderr, "qdisc '%s' does not support option parsing\n", k);
++                      return -1;
++              }
++      } else {
++              if (argc) {
+                       if (matches(*argv, "help") == 0)
+                               usage();
+--
+cgit v0.9.2
+From 734c0ca2cabf96e2ac1abe6e1b0968d0b5b03b11 Mon Sep 17 00:00:00 2001
+From: Stephen Hemminger <stephen@networkplumber.org>
+Date: Sun, 27 Oct 2013 19:28:38 +0000
+Subject: htb: remove old unused duplicate qdisc name
+
+Alexey had htb2 as name for version in ancient code.
+---
+diff --git a/tc/q_htb.c b/tc/q_htb.c
+index 6737ddb..e108857 100644
+--- a/tc/q_htb.c
++++ b/tc/q_htb.c
+@@ -346,13 +346,3 @@ struct qdisc_util htb_qdisc_util = {
+       .parse_copt     = htb_parse_class_opt,
+       .print_copt     = htb_print_opt,
+ };
+-
+-/* for testing of old one */
+-struct qdisc_util htb2_qdisc_util = {
+-      .id             =  "htb2",
+-      .parse_qopt     = htb_parse_opt,
+-      .print_qopt     = htb_print_opt,
+-      .print_xstats   = htb_print_xstats,
+-      .parse_copt     = htb_parse_class_opt,
+-      .print_copt     = htb_print_opt,
+-};
+--
+cgit v0.9.2
This page took 0.174872 seconds and 4 git commands to generate.