g_outputBuffer="Error: "+string(e.what())+"\n";
}
});
- g_lua.writeFunction("setACL", [](const vector<pair<int, string>>& parts) {
+ g_lua.writeFunction("setACL", [](boost::variant<string,vector<pair<int, string>>> inp) {
NetmaskGroup nmg;
- for(const auto& p : parts) {
+ if(auto str = boost::get<string>(&inp)) {
+ nmg.addMask(*str);
+ }
+ else for(const auto& p : boost::get<vector<pair<int,string>>>(inp)) {
nmg.addMask(p.second);
}
g_ACL.setState(nmg);
}
auto acl = g_ACL.getLocal();
auto localPolicy = g_policy.getLocal();
-
auto localRulactions = g_rulactions.getLocal();
auto localServers = g_dstates.getLocal();
struct msghdr msgh;