Commit 48f1bf55 authored by Leigh Stoller's avatar Leigh Stoller

Fix to blackhole mode (link down/up) on Linux.

parent d116e2e2
......@@ -707,7 +707,7 @@ void set_link_params(int l_index, int blackhole, int p_which)
sprintf(cmd, "tc qdisc change "
"dev %s handle %d netem drop %.2f delay %dms",
iface, pipeno + 10,
p_params->plr * 100, p_params->delay);
(blackhole ? 100.0 : p_params->plr * 100), p_params->delay);
if (debug)
info("%s\n", cmd);
......@@ -734,7 +734,9 @@ void set_link_params(int l_index, int blackhole, int p_which)
// Now loss and delay. loss is in percent.
sprintf(cmd, "tc qdisc change "
"dev %s handle 3 netem drop %.2f delay %dms",
iface, p_params->plr * 100, p_params->delay);
iface,
(blackhole ? 100.0 : p_params->plr * 100),
p_params->delay);
if (debug)
info("%s\n", cmd);
......
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