Merge pull request #48876 from Vaelatern/make-network-learning-optional

Make IP_LEARNING optional
This commit is contained in:
Nicole Thomas 2018-08-02 15:30:23 -04:00 committed by GitHub
commit e79ccb35b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -371,7 +371,8 @@ def create(vm_):
for iface_xml in domain_xml.findall('./devices/interface'):
iface_xml.remove(iface_xml.find('./mac'))
# enable IP learning, this might be a default behaviour...
if iface_xml.find("./filterref/parameter[@name='CTRL_IP_LEARNING']") is None:
# Don't always enable since it can cause problems through libvirt-4.5
if ip_source == 'ip-learning' and iface_xml.find("./filterref/parameter[@name='CTRL_IP_LEARNING']") is None:
iface_xml.append(ElementTree.fromstring(IP_LEARNING_XML))
# If a qemu agent is defined we need to fix the path to its socket