From: Mark Wells Date: Fri, 5 Aug 2016 07:24:43 +0000 (-0700) Subject: when allocating IP addresses, correctly roll over to the next block, #42406 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=96ac8187cdd42d1022944c6a41136378f841f064;hp=707b5633e9e8de71e9592bc135cb79f31725df6a when allocating IP addresses, correctly roll over to the next block, #42406 --- 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); ''; }