diff options
author | Mark Wells <mark@freeside.biz> | 2016-08-05 00:24:43 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-08-11 16:19:55 -0700 |
commit | 459bd7aac2b4ca34b61fa58123f5c86c5ac9d537 (patch) | |
tree | 95a9cfc52c8836bde10e04735b3dc010c0fbfebf | |
parent | 2787aff7551116a223b4dea8bb144c1d03452d01 (diff) |
when allocating IP addresses, correctly roll over to the next block, #42406
-rw-r--r-- | FS/FS/IP_Mixin.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/FS/FS/IP_Mixin.pm b/FS/FS/IP_Mixin.pm index d4920468c..beb41d290 100644 --- a/FS/FS/IP_Mixin.pm +++ b/FS/FS/IP_Mixin.pm @@ -153,14 +153,14 @@ sub assign_ip_addr { # don't exit early on assigning a free address--check the rest of # the blocks to see if the current address is in one of them. if (!$new_addr) { - $new_addr = $block->next_free_addr->addr; + $new_addr = $block->next_free_addr; $new_block = $block; } } return 'No IP address available on this router' unless $new_addr; - $self->ip_addr($new_addr); + $self->ip_addr($new_addr->addr); $self->addr_block($new_block); ''; } |