[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] network: bridge: Don't start network if it collides with host routing



On 05/21/2010 01:23 AM, Laine Stump wrote:
> On 05/20/2010 07:41 PM, Cole Robinson wrote:
>> Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=235961
>>
>> If using the default virtual network, an easy way to lose guest network
>> connectivity is to install libvirt inside the VM. The autostarted
>> default network inside the guest collides with host virtual network
>> routing. This is a long standing issue that has caused users quite a
>> bit of pain and confusion.
>>
>> On network startup, parse /proc/net/route
> 
> Any interest in doing this with netlink instead? (I've got this "thing" 
> against parsing text files to get information if it can be retrieved via 
> a nice clean API). If so, I think I can whip up the equivalent code with 
> libnl calls, but probably not until later in the afternoon.
> 
> If I'm the only one who feels uneasy about parsing stuff out of /proc, 
> then I'm fine with that too.
> 

My feeling is it depends on what else libnl buys us. A library
dependency for a single safety check doesn't seem worth it. If we use
the lib, we definitely don't want it to be optional, as debugging
network issues in the future shouldn't require asking 'is libvirt
compiled against libnl'.

Also, this code is pretty simple, and I think /proc/net/route is as
stable as it gets.

>>   and compare the requested
>> IP+netmask against host routing destinations: if any matches are found,
>> refuse to start the network.
>>    
> 
> Do we maybe want to check for any networks that would encompass existing 
> host interface IP addresses, or existing route destination IPs?
>

I'm not really knowledgeable enough to say, but we should try and detect
any common case that may cause host networking malfunction.

Thanks,
Cole


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]