<html><body>
<p><font size="2" face="sans-serif">Thank you to all who have participated in this thread.  I've just proposed a fix in gerrit.  For those involved thus far, if you could review I would be greatly appreciative!</font><br>
<br>
<font size="2" face="sans-serif"><a href="https://review.openstack.org/#/c/68742/1">https://review.openstack.org/#/c/68742/1</a><br>
<br>
</font><br>
<br>
<tt><font size="2">Carl Baldwin <carl@ecbaldwin.net> wrote on 01/21/2014 05:27:49 PM:<br>
<br>
> From: Carl Baldwin <carl@ecbaldwin.net></font></tt><br>
<tt><font size="2">> To: "OpenStack Development Mailing List (not for usage questions)" <br>
> <openstack-dev@lists.openstack.org>, </font></tt><br>
<tt><font size="2">> Date: 01/21/2014 05:32 PM</font></tt><br>
<tt><font size="2">> Subject: Re: [openstack-dev] [neutron] Neutron should disallow /32 CIDR</font></tt><br>
<tt><font size="2">> <br>
> I think there may be some confusion between the two concepts:  subnet<br>
> and allocation pool.  You are right that an ipv4 subnet smaller than<br>
> /30 is not useable on a network.<br>
> <br>
> However, this method is checking the validity of an allocation pool.<br>
> These pools should not include room for a gateway nor broadcast<br>
> address.  Their relation to subnets is that the range of ips contained<br>
> in the pool must fit within the allocatable IP space on the subnet<br>
> from which they are allocated.  Other than that, they are simple<br>
> ranges; they don't need to be cidr aligned or anything.  A pool of a<br>
> single IP is valid.<br>
> <br>
> I just checked the method's implementation now.  It does check that<br>
> the pool fits within the allocatable range of the subnet.  I think<br>
> we're good.<br>
> <br>
> Carl<br>
> <br>
> On Tue, Jan 21, 2014 at 3:35 PM, Paul Ward <wpward@us.ibm.com> wrote:<br>
> > Currently, NeutronDbPluginV2._validate_allocation_pools() does some very<br>
> > basic checking to be sure the specified subnet is valid.  One thing that's<br>
> > missing is checking for a CIDR of /32.  A subnet with one IP address in it<br>
> > is unusable as the sole IP address will be allocated to the gateway, and<br>
> > thus no IPs are left over to be allocated to VMs.<br>
> ><br>
> > The fix for this is simple.  In<br>
> > NeutronDbPluginV2._validate_allocation_pools(), we'd check for start_ip ==<br>
> > end_ip and raise an exception if that's true.<br>
> ><br>
> > I've opened lauchpad bug report 1271311<br>
> > (<a href="https://bugs.launchpad.net/neutron/+bug/1271311">https://bugs.launchpad.net/neutron/+bug/1271311</a>) for this, but wanted to<br>
> > start a discussion here to see if others find this enhancement to be a<br>
> > valuable addition.<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > OpenStack-dev mailing list<br>
> > OpenStack-dev@lists.openstack.org<br>
> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
> ><br>
> <br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> OpenStack-dev@lists.openstack.org<br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
> <br>
</font></tt></body></html>