]> git.ipfire.org Git - thirdparty/kea.git/commit
[#13,!6] allocation engine modifications to support v6 global host reservations
authorThomas Markwalder <tmark@isc.org>
Fri, 17 Aug 2018 18:27:57 +0000 (14:27 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 17 Aug 2018 18:27:57 +0000 (14:27 -0400)
commit7cb7013bfb5b99b74105764362a16e125eec5b53
treeacbbc88bc5b8670739e7d72e7f9226a495ed7537
parent436c99f868d73f4e7ea2e94c19543c85aecebefb
[#13,!6] allocation engine modifications to support v6 global host reservations

src/lib/dhcpsrv/alloc_engine.cc
    New functions:
        AllocEngine::ClientContext6::globalHost()
        AllocEngine::ClientContext6::hasGlobalReservation()
        AllocEngine::findGlobalReservation()
        AllocEngine::allocateGlobalReservedLeases6()

    Modified functions:
        AllocEngine::ClientContext6::currentHost() - modified to take
        into account a global host

        AllocEngine::findReservation() - modified to use findGlobalReservation()
        AllocEngine::allocateLeases6() - modified to use allocateGlobalReservation()
        AllocEngine::removeNonmatchingReservedLeases6() - modified to
        retain global reservations

        AllocEngine::extendLease6() - modified to bypass range and client
        mismatch disqualification for global reservations

src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
    TEST_F(AllocEngine6Test, globalHostDynamicAddress)
    TEST_F(AllocEngine6Test, globalHostReservedAddress)
    TEST_F(AllocEngine6Test, globalHostReservedPrefix)

src/lib/dhcpsrv/tests/alloc_engine_utils.cc
    testStatistics() - changed to test against SUBNET_ID_UNSUSED

src/lib/dhcpsrv/tests/alloc_engine_utils.h
    testStatistics() - changed subnet_id default
src/lib/dhcpsrv/alloc_engine.cc
src/lib/dhcpsrv/alloc_engine.h
src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
src/lib/dhcpsrv/tests/alloc_engine_utils.cc
src/lib/dhcpsrv/tests/alloc_engine_utils.h