summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-04-18 18:03:13 -0700
committerIvan Kohler <ivan@freeside.biz>2018-04-18 18:03:13 -0700
commitf24e5af480c4101cb585c2b6f325508a15c8fb3c (patch)
treee4df68025de2163d4d9c515f1a5b4ee880a6def1 /FS
parent2f341bbdeeebb1a138aae020d2297fb22da98f98 (diff)
ip allocation mutex for high-traffic implementations, RT#79825
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/IP_Mixin.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/IP_Mixin.pm b/FS/FS/IP_Mixin.pm
index beb41d290..3ec769313 100644
--- a/FS/FS/IP_Mixin.pm
+++ b/FS/FS/IP_Mixin.pm
@@ -130,6 +130,10 @@ sub assign_ip_addr {
my $self = shift;
my %opt = @_;
+ #otherwise we'll get the same assignment for concurrent identical calls
+ # this will serialize them
+ $_->lock_table foreach @subclasses;
+
my @blocks;
my $na = $self->NetAddr;