mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-13 12:58:17 +03:00
fix libvirt network filter for vrouter IPs (#261)
This adds VROUTER_IP, if present, to the libvirt network filter; without this traffic from the vrouter IP is blocked by ebtables if using the libvirt network filter.
This commit is contained in:
parent
1da6f3619d
commit
343fd21857
@ -167,6 +167,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
string script = "";
|
||||
string model = "";
|
||||
string ip = "";
|
||||
string vrouter_ip = "";
|
||||
string filter = "";
|
||||
|
||||
string i_avg_bw = "";
|
||||
@ -869,6 +870,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
script = nic[i]->vector_value("SCRIPT");
|
||||
model = nic[i]->vector_value("MODEL");
|
||||
ip = nic[i]->vector_value("IP");
|
||||
vrouter_ip = nic[i]->vector_value("VROUTER_IP");
|
||||
filter = nic[i]->vector_value("FILTER");
|
||||
|
||||
i_avg_bw = nic[i]->vector_value("INBOUND_AVG_BW");
|
||||
@ -956,8 +958,13 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
file << "\t\t\t<filterref filter="
|
||||
<< one_util::escape_xml_attr(*the_filter) << ">\n"
|
||||
<< "\t\t\t\t<parameter name='IP' value="
|
||||
<< one_util::escape_xml_attr(ip) << "/>\n"
|
||||
<< "\t\t\t</filterref>\n";
|
||||
<< one_util::escape_xml_attr(ip) << "/>\n";
|
||||
if ( !vrouter_ip.empty() )
|
||||
{
|
||||
file << "\t\t\t\t<parameter name='IP' value="
|
||||
<< one_util::escape_xml_attr(vrouter_ip) << "/>\n";
|
||||
}
|
||||
file << "\t\t\t</filterref>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user