Commit e9bc3c40 authored by shemminger's avatar shemminger

Always send reorder message (for compatiablity)

and parse response correctly with netem.
parent a31a5d59
2005-12-02 Stephen Hemminger <shemminger@osdl.org>
2005-12-09 Stephen Hemminger <shemminger@osdl.org>
* Add corrupt feature to netem
......
......@@ -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]);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment