Skip to content

Commit

Permalink
Do not try to reserve the address if it is same as gateway ip. Gatewa…
Browse files Browse the repository at this point in the history
…y ip is already reserved at the time of subnet creation.

Change-Id: Id763db6d20620dd820443ffb619c0fb66c0b8190
Closes-Bug: 1372384
(cherry picked from commit aad6d3e)
  • Loading branch information
Sachin Bansal committed Sep 23, 2014
1 parent 29179cb commit 4fb15fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/api-server/vnc_addr_mgmt.py
Expand Up @@ -745,6 +745,8 @@ def ip_alloc_req(self, vn_fq_name, sub=None, asked_ip_addr=None):
addr_from_start = subnet_dict['addr_start'])
self._subnet_objs[vn_fq_name_str][subnet_name] = subnet_obj

if asked_ip_addr == str(subnet_obj.gw_ip):
return asked_ip_addr
if asked_ip_addr and not subnet_obj.ip_belongs(asked_ip_addr):
continue
try:
Expand Down

0 comments on commit 4fb15fc

Please sign in to comment.