[libvirt] Adding and Clearing bridge addresses

Gene Czarcinski gene at czarc.net
Tue Mar 12 17:45:55 UTC 2013


I have been working on this patch to have libvirt optionally set static 
routes.

So I found the function that adds both IPv4 and IPv6 addresses to the 
bridge in virnetdev.c. I found that besides the 
virNetDevAddIPv4Address() there is also virNetDevCleanIPv4Address().  I 
patterned my virNetDevAddGateway() after the virNetDevAddIPv4Address() 
function.

What I am puzzled about is that it appears that nobody calls the Clear 
function.  What don't I understand?

It appears to me that the addresses and routes assigned to a bridge are 
all removed when the network is destroyed but otherwise remain.

Gene




More information about the libvir-list mailing list