mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-12 16:44:48 +00:00
Always send reorder message (for compatiablity)
and parse response correctly with netem.
This commit is contained in:
parent
a31a5d5904
commit
e9bc3c40d0
@ -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
|
||||
|
||||
|
@ -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 (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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user