From 7738617402d4f0a6fd6b75fa8c56b48c715a3c51 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 18 Apr 2018 18:03:07 -0700 Subject: [PATCH] ip allocation mutex for high-traffic implementations, RT#79825 --- FS/FS/IP_Mixin.pm | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.11.0