Commit 49fd3742 authored by Ryan Jackson's avatar Ryan Jackson
Browse files

Added LINK_UP to linux backend

Fixed bug in subscription code for simplex links.
parent 8543b5d9
...@@ -357,6 +357,24 @@ void NetlinkPipe::updateParameter(Parameter const & newParameter) ...@@ -357,6 +357,24 @@ void NetlinkPipe::updateParameter(Parameter const & newParameter)
rtnl_qdisc_change(nl_handle, qdisc, NULL); rtnl_qdisc_change(nl_handle, qdisc, NULL);
rtnl_qdisc_put(qdisc); rtnl_qdisc_put(qdisc);
break; break;
case Parameter::LINK_UP:
uint32_t value;
if (newParameter.getValue()) {
value = 1;
}
else {
value = 0x7ffffffff;
}
qdisc = rtnl_qdisc_get(qdisc_cache, ifindex, plrHandle);
if (qdisc == NULL) {
cerr << "Couldn't find plr qdisc " << plrHandle << endl;
return;
}
rtnl_plr_set_plr(qdisc, value);
rtnl_qdisc_change(nl_handle, qdisc, NULL);
rtnl_qdisc_put(qdisc);
break;
default: default:
break; break;
} }
......
...@@ -170,7 +170,7 @@ void readMapFile(string const & mapFile, string & linkSubscribe, string & resetS ...@@ -170,7 +170,7 @@ void readMapFile(string const & mapFile, string & linkSubscribe, string & resetS
g::pipeVault.push_front(first); g::pipeVault.push_front(first);
g::pipes.insert(make_pair(/*"new" + */first.name, g::pipeVault.begin())); g::pipes.insert(make_pair(/*"new" + */first.name, g::pipeVault.begin()));
g::pipes.insert(make_pair(/*"new" + */first.linkName, g::pipeVault.begin())); g::pipes.insert(make_pair(/*"new" + */first.linkName, g::pipeVault.begin()));
addEntry(linkSubscribe, /*"new" + */first.endName); addEntry(linkSubscribe, /*"new" + */first.linkName);
addEntry(linkSubscribe, /*"new" + */first.name); addEntry(linkSubscribe, /*"new" + */first.name);
addEntry(resetSubscribe, /*"new" + */first.name); addEntry(resetSubscribe, /*"new" + */first.name);
......
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