libvirt/src/network
Michal Privoznik d9706aea18 network_conf: Drop virNetworkObjIsDuplicate
This function does not make any sense now, that network driver is
(almost) dropped. I mean, previously, when threads were
serialized, this function was there to check, if no other network
with the same name or UUID exists. However, nowadays that threads
can run more in parallel, this function is useless, in fact it
gives misleading return values. Consider the following scenario.
Two threads, both trying to define networks with same name but
different UUID (e.g. because it was generated during XML parsing
phase, whatever). Lets assume that both threads are about to call
networkValidate() which immediately calls
virNetworkObjIsDuplicate().

T1: calls virNetworkObjIsDuplicate() and since no network with
given name or UUID exist, success is returned.
T2: calls virNetworkObjIsDuplicate() and since no network with
given name or UUID exist, success is returned.

T1: calls virNetworkAssignDef() and successfully places its
network into the virNetworkObjList.
T2: calls virNetworkAssignDef() and since network with the same
name exists, the network definition is replaced.

Okay, this is mainly because virNetworkAssignDef() does not check
whether name and UUID matches. Well, lets make it so! And drop
useless function too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-03-23 09:56:15 +01:00
..
bridge_driver_linux.c Fix common misspellings 2015-03-23 09:01:30 +01:00
bridge_driver_nop.c
bridge_driver_platform.c
bridge_driver_platform.h struct _virNetworkDriverState: Annotate items 2015-03-13 15:55:56 +01:00
bridge_driver.c network_conf: Drop virNetworkObjIsDuplicate 2015-03-23 09:56:15 +01:00
bridge_driver.h network: dnsmasq: Don't format lease file path 2014-12-03 14:22:40 +01:00
default.xml
leaseshelper.c leaseshelper: Fix incorrect alignment of a switch case 2014-12-03 18:47:24 +01:00