Commit 1d57447b authored by Ryan Jackson's avatar Ryan Jackson
Browse files

Forced link to be up at beginning of first test

Converted from kbits per second to bytes per second for htb qdisc
parent 9783c6e5
......@@ -337,18 +337,20 @@ void NetlinkPipe::updateParameter(Parameter const & newParameter)
{
struct rtnl_qdisc *qdisc;
struct rtnl_class *htbClass;
int rate;
qdisc = NULL;
switch(newParameter.getType()) {
case Parameter::BANDWIDTH:
rate = newParameter.getValue() * 1000 / 8;
htbClass = rtnl_class_get(class_cache, htbClassHandle);
if (htbClass == NULL) {
cerr << "Couldn't find htb class " << htbClassHandle << endl;
return;
}
rtnl_htb_set_rate(htbClass, newParameter.getValue() * 1000);
rtnl_htb_set_ceil(htbClass, newParameter.getValue() * 1000);
rtnl_htb_set_rate(htbClass, rate);
rtnl_htb_set_ceil(htbClass, rate);
rtnl_class_change(nl_handle, htbClass, NULL);
rtnl_class_put(htbClass);
break;
......
......@@ -29,6 +29,7 @@ sub check
system($command);
}
sendEvent("$link", "UP");
sendEvent($link, "MODIFY DELAY=30");
sendEvent($link, "MODIFY BANDWIDTH=1000");
sendEvent("$link-$node1", "MODIFY DELAY=10");
......
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