<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Wouldn't be easier just to check if:</div><div><br></div><div>cidr is 32?</div><div><br></div><div> I believe it is a good idea to not allow /32 network but this is just my opinion</div><div><br></div><div>Edgar</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Paul Ward <<a href="mailto:wpward@us.ibm.com">wpward@us.ibm.com</a>><br><span style="font-weight:bold">Reply-To: </span> OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br><span style="font-weight:bold">Date: </span> Tuesday, January 21, 2014 12:35 PM<br><span style="font-weight:bold">To: </span> OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br><span style="font-weight:bold">Subject: </span> [openstack-dev] [neutron] Neutron should disallow /32 CIDR<br></div><div><br></div><div><div><p><font size="2" face="sans-serif">Currently, NeutronDbPluginV2._validate_allocation_pools() does some very basic checking to be sure the specified subnet is valid.  One thing that's missing is checking for a CIDR of /32.  A subnet with one IP address in it is unusable as the sole IP address will be allocated to the gateway, and thus no IPs are left over to be allocated to VMs.</font><br><br><font size="2" face="sans-serif">The fix for this is simple.  In NeutronDbPluginV2._validate_allocation_pools(), we'd check for start_ip == end_ip and raise an exception if that's true.</font><br><br><font size="2" face="sans-serif">I've opened lauchpad bug report 1271311 (<a href="https://bugs.launchpad.net/neutron/+bug/1271311">https://bugs.launchpad.net/neutron/+bug/1271311</a>) for this, but wanted to start a discussion here to see if others find this enhancement to be a valuable addition.</font></p></div></div>_______________________________________________
OpenStack-dev mailing list
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</span></body></html>