1. 10 Oct, 2019 2 commits
    • Thomas Markwalder's avatar
      [#35,!517] Added getDdnsParams() to AllocEngine::ClientContext4/6 · 77cfe4bc
      Thomas Markwalder authored
      src/lib/dhcpsrv/alloc_engine.*
          AllocEngine::ClientContext6::getDdnsParams()
          AllocEngine::ClientContext4::getDdnsParams() - new
          methods which return a DdnsParams instance scoped by
          currently selected subnet
      
          Replaced direct references to context::ddns_params_ with
          new getter methods.
      
      src/lib/dhcpsrv/parsers/simple_parser4.cc
      src/lib/dhcpsrv/parsers/simple_parser6.cc
          Removed global defaults for hostname-char-set/replacement
      77cfe4bc
    • Thomas Markwalder's avatar
      [#35,!517] Modify D2ClientMgr functions to accept DdnsParams parameter · b767f944
      Thomas Markwalder authored
      D2ClientMgr functions now get behavior parameters from a passed in
      structure instead of D2ClientMgr::d2_client_config_.
      
      src/lib/dhcpsrv/d2_client_cfg.h
          struct DdnsParams  - new structure to convey request specific
          (i.e.scopable) Ddns params
      
      src/lib/dhcpsrv/alloc_engine.cc
      src/lib/dhcpsrv/alloc_engine.h
          Added ddns_params_ to ClientContext4/6
      
      src/lib/dhcpsrv/d2_client_mgr.*
          D2ClientMgr::adjustFqdnFlags()
          D2ClientMgr::adjustDomainName()
          D2ClientMgr::analyzeFqdn()
          D2ClientMgr::generateFqdn()
          D2ClientMgr::qualifyName() - now accept DdnsParams instance as
          parameter
      
      src/lib/dhcpsrv/tests/d2_client_unittest.cc
          Reworked tests to use DdnsParams
      b767f944
  2. 22 Jun, 2019 3 commits
  3. 26 Nov, 2018 1 commit
  4. 08 Nov, 2018 1 commit
  5. 27 Aug, 2018 1 commit
  6. 17 Aug, 2018 2 commits
    • Thomas Markwalder's avatar
      [#13,!6] allocation engine modifications to support v6 global host reservations · 2a90f95d
      Thomas Markwalder authored
      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
      2a90f95d
    • Thomas Markwalder's avatar
      [#13,!6] allocation engine modifications to support v6 global host reservations · 7cb7013b
      Thomas Markwalder authored
      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
      7cb7013b
  7. 14 Aug, 2018 1 commit
    • Thomas Markwalder's avatar
      [5705] AllocEngine4 now matches clients to global HRs · e46618e6
      Thomas Markwalder authored
      src/bin/dhcp4/tests/Makefile.am
      src/bin/dhcp4/tests/host_unittest.cc - new file with global HR tests
      
      src/lib/dhcpsrv/alloc_engine.*
          findGlobalReservation() - new function that searches for global HR
      
          findReservation() - calls findGlobalReservation() if mode is global
      
          hasAddressReservation()
          ClientContext4::currentHost()
              - modified to recognize global HRs
      
      src/lib/dhcpsrv/network.h
          Added new mode, Netork::HR_GLOBAL
      
      src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
          TEST_F(AllocEngine4Test, globalReservationReservedAddressDiscover)
          TEST_F(AllocEngine4Test, globalReservationReservedAddressRequest)
          TEST_F(AllocEngine4Test, globalReservationDynamicDiscover)
          TEST_F(AllocEngine4Test, globalReservationDynamicRequest) - new tests
      e46618e6
  8. 29 Jun, 2018 1 commit
  9. 27 Apr, 2018 2 commits
  10. 25 Apr, 2018 1 commit
  11. 19 Apr, 2018 1 commit
  12. 01 Apr, 2018 1 commit
  13. 26 Feb, 2018 1 commit
  14. 29 Jan, 2018 2 commits
  15. 26 Jan, 2018 1 commit
  16. 22 Jan, 2018 1 commit
  17. 19 Jan, 2018 1 commit
  18. 18 Jan, 2018 1 commit
  19. 20 Nov, 2017 1 commit
  20. 05 Nov, 2017 1 commit
  21. 04 Nov, 2017 1 commit
  22. 07 Oct, 2017 1 commit
  23. 21 Sep, 2017 2 commits
  24. 19 Sep, 2017 1 commit
    • Tomek Mrugalski's avatar
      [5306] Changes after review: · 9079ba12
      Tomek Mrugalski authored
       - max attempts set to 0 in unit-tests (matching production code)
       - couple typos
       - new unit-test added (selectSharedNetworkByRelayAddressSubnetLevel)
       - ClientContext4 is now noncopyable
       - unused network parameter removed
      9079ba12
  25. 18 Sep, 2017 1 commit
  26. 18 Aug, 2017 1 commit
  27. 23 Jan, 2017 1 commit
  28. 11 Jan, 2017 1 commit
  29. 14 Dec, 2016 1 commit
  30. 27 Oct, 2016 1 commit
  31. 26 Oct, 2016 1 commit
  32. 16 Sep, 2016 1 commit
    • Thomas Markwalder's avatar
      [5007] Addressed review comments · 1a986cf4
      Thomas Markwalder authored
      This is solution #2:
      
      src/lib/dhcpsrv/alloc_engine.h
      src/lib/dhcpsrv/alloc_engine.cc
          AllocEngine::extendLease6() - replaced logic to set the context flags with
          simply adding the original lease to the changed_leases_ list.
      
          AllocEngine::updateLeaseData() - removed logic to set the context flags.
      
      src/bin/dhcp6/dhcp6_srv.cc
          Dhcpv6Srv::createNameChangeRequests() - replaced the context flag check
          with logic which looks for candidate IA addresses in the ctx.changed_leases_
          list.  If found and the FDQN doman name has not changed, we move on to the
          next candidate.
      
      src/bin/dhcp6/tests/fqdn_unittest.cc
          TEST_F(FqdnDhcpv6SrvTest, createNameChangeRequestsNoAddr) - removed
          testing of context flag permutations
      1a986cf4
  33. 15 Sep, 2016 1 commit
    • Thomas Markwalder's avatar
      [5007] Suppress DDNS updates on DHCPv6 lease renewals unless the FQDN changes · 46f4c9fd
      Thomas Markwalder authored
      src/lib/dhcpsrv/alloc_engine.h
      src/lib/dhcpsrv/alloc_engine.cc
          - AllocEngine::extendLease6()
          - AllocEngine::updateLeaseData() - logic was added to clear the context
          DNS update flags when the renewal does not alter the lease's FQDN.
      
      src/bin/dhcp6/dhcp6_srv.h
      src/bin/dhcp6/dhcp6_srv.cc
          - Dhcpv6Srv::createNameChangeRequests() - added context as second parameter,
          and modified function to return without creating NCR(s) if both update flags
          in the context are false.
      
      src/bin/dhcp6/tests/fqdn_unittest.cc
          - TEST_F(FqdnDhcpv6SrvTest, createNameChangeRequests) - modified to verify
          combinations of context update flags
      
          - TEST_F(FqdnDhcpv6SrvTest, DISABLED_processTwoRequests) - renamed
          to TEST_F(FqdnDhcpv6SrvTest, processTwoRequestsDiffFqdn) and enabled.
          It had been disabled pending 3677 which has been completed.
      
          - TEST_F(FqdnDhcpv6SrvTest, processTwoRequestsSameFqdn)  - new test
          which verifies that client "renewing" a lease by sending a second
          request with the different FQDN generates the correct NCRs
      
          - TEST_F(FqdnDhcpv6SrvTest, DISABLED_processRequestRenew) - renamed
          to TEST_F(FqdnDhcpv6SrvTest, processRequestRenewDiffFqdn) and enabled.
          It had been disabled pending 3677 which has been completed.
      
          - TEST_F(FqdnDhcpv6SrvTest, processRequestRenewSameFqdn) - new test
          which verifies that client renewing a lease by sending a renew
          with the same FQDN does NOT generate any NCRs
      46f4c9fd