On 04/25/2013 03:13 PM, Gene Czarcinski wrote:
On 04/22/2013 11:59 AM, Laine Stump wrote:
> address should be optional unless prefix or netmask is non-0, although
> I've now noticed that won't be handled properly due to
> virSocketAddrGetIpPrefix returning -1 when there is no address or prefix
> or netmask (I'm fixing that before I push that patch, so you can just
> toss your 1/2 patch, rebase, and assume it's fixed).
I have most of the stuff reworked except for the address, gateway,
netmask, and prefix code. Getting all of those balanced so they work
correctly is a bit tricky..
1. For <route>, I am requiring that both address= and gateway= be
specified with address='0.0.0.0' and address='::' being valid
addresses. For IPv4, netmask='0.0.0.0' works correctly but prefix=0
does not.
For IPv4, address='0.0.0.0' results in a default route. I am not sure
what all these extra default routes are going to do to things but lets
not get in the way of the experimenter.
For IPv6, this address='::', prefix='0' is a slightly different matter
as default routes are usually handled differently. I am going to go
ahead and implement it but I am not sure it is a good idea.
"Normally," if you do not specify a prefix for IPv6, the default is
64. But if you do specify one, then it will be used.
It is getting real close and it should be ready "real soon now" ;))
AARRRRGH!!!!
With IPv4 using address='0.0.0.0' and netmask='0.0.0.0' things work just
fine but with prefix not so much. The problem is that with prefix=0, it
is not in the xml which then results it it defaulting at a later time.
This is an extreme corner case. Usually a zero prefix is just ignored.
Gene