]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Always send reorder message (for compatiablity)
authorshemminger <shemminger>
Sat, 10 Dec 2005 00:01:02 +0000 (00:01 +0000)
committershemminger <shemminger>
Sat, 10 Dec 2005 00:01:02 +0000 (00:01 +0000)
and parse response correctly with netem.

ChangeLog
tc/q_netem.c

index 0d057ecdf27e67cb1cf6781ee66554f45652ea67..09a0373b199c4e7dafd05a0efea34562d7dbd562 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2005-12-02  Stephen Hemminger  <shemminger@osdl.org>
+2005-12-09  Stephen Hemminger  <shemminger@osdl.org>
 
        * Add corrupt feature to netem
 
index a04a6f2c790d24c0f8fc58ad52e5fb9f5ffb7edf..757edcaee717e9ddd5fc1c2e5e4a05ca1a46da98 100644 (file)
@@ -273,10 +273,8 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
                        return -1;
        }
 
-       if (reorder.probability) {
-               if (addattr_l(n, TCA_BUF_MAX, TCA_NETEM_REORDER, &reorder, sizeof(reorder)) < 0)
-                       return -1;
-       }
+       if (addattr_l(n, TCA_BUF_MAX, TCA_NETEM_REORDER, &reorder, sizeof(reorder)) < 0)
+               return -1;
 
        if (corrupt.probability) {
                if (addattr_l(n, TCA_BUF_MAX, TCA_NETEM_CORRUPT, &corrupt, sizeof(corrupt)) < 0)
@@ -328,7 +326,7 @@ static int netem_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
                if (tb[TCA_NETEM_CORRUPT]) {
                        if (RTA_PAYLOAD(tb[TCA_NETEM_CORRUPT]) < sizeof(*corrupt))
                                return -1;
-                       corrupt = RTA_DATA(tb[TCA_NETEM_REORDER]);
+                       corrupt = RTA_DATA(tb[TCA_NETEM_CORRUPT]);
                }
        }