Re: [PATCH 02/13] New virNetworkDef utility functions

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

 



On 12/21/2010 04:52 PM, Laine Stump wrote:
On 12/20/2010 06:52 PM, Eric Blake wrote:
On 12/20/2010 01:03 AM, Laine Stump wrote:
Later patches will add the possibility to define a network's netmask
as a prefix (0-32, or 0-128 in the case of IPv6). To make it easier to
deal with definition of both kinds (prefix or netmask), add two new
functions:

virNetworkDefNetmask: return a copy of the netmask into a
virSocketAddr. If no netmask was specified in the XML, create a
default netmask based on the network class of the virNetworkDef's IP
address.

virNetworkDefPrefix: return the netmask as numeric prefix (or the
default prefix for the network class of the virNetworkDef's IP
address, if no netmask was specified in the XML)
What happens if the user specifies a netmask in the XML that is
non-contiguous (bad practice, but some routers do allow it)?

If that's the case,

Sorry, I accidentally hit send before I finished my thought...

If someone wants to use a non-contiguous netmask, they can't use libvirt's virtual networks anyway, because iptables doesn't work with non-contiguous netmasks (netmask is specified as a prefix in all iptables commands - a later patch in this series takes advantage of that to simplify things).

So I don't think it's something we need to be concerned about.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]