From: Razvan Becheriu Date: Tue, 9 Apr 2019 14:54:16 +0000 (+0300) Subject: make allocation engine thread safe X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1722e558a600d238459dcc6bf00dfdec20bdb4bf;p=thirdparty%2Fkea.git make allocation engine thread safe --- diff --git a/src/lib/dhcpsrv/alloc_engine.cc b/src/lib/dhcpsrv/alloc_engine.cc index 7317389ada..010d1187f9 100644 --- a/src/lib/dhcpsrv/alloc_engine.cc +++ b/src/lib/dhcpsrv/alloc_engine.cc @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/src/lib/dhcpsrv/alloc_engine.h b/src/lib/dhcpsrv/alloc_engine.h index 1edc9b1e4d..03314b3285 100644 --- a/src/lib/dhcpsrv/alloc_engine.h +++ b/src/lib/dhcpsrv/alloc_engine.h @@ -181,6 +181,9 @@ protected: static isc::asiolink::IOAddress increaseAddress(const isc::asiolink::IOAddress& address, bool prefix, const uint8_t prefix_len); + + private: + std::mutex mutex_; }; /// @brief Address/prefix allocator that gets an address based on a hash