1. 10 Oct, 2019 2 commits
    • Thomas Markwalder's avatar
      [#35,!517] Rework kea-dhcp6 parsing and server · ce14110b
      Thomas Markwalder authored
      src/bin/dhcp6/ctrl_dhcp6_srv.cc
          Removed setting D2ClientCfg fetch function
      
      src/bin/dhcp6/dhcp6_lexer.ll
      src/bin/dhcp6/dhcp6_parser.yy
          ddns-send-updates
          ddns-override-no-update
          ddns-override-client-update
          ddns-replace-client-name
          ddns-generated-prefix
          ddns-qualifying-suffix
          - added to DHCP4,SHARED_NETWORK,SUBNET4
      
          hostname-char-set
          hostname-char-replacement
          - added to SHARED_NETWORK,SUBNET4
      
      src/bin/dhcp6/dhcp6_srv.cc
          Dhcpv6Srv::processClientFqdn()
          Dhcpv6Srv::createNameChangeRequests()
          Dhcpv6Srv::updateReservedFqdn()
          - use cxt.getDdnsParams()
      
      src/bin/dhcp6/json_config_parser.cc
          configureDhcp6Server()
          - use SrvConfig::moveDdnsParams() to move dhcp-ddns parameters
          - handle new "ddns-" globals
      
      src/bin/dhcp6/tests/config_parser_unittest.cc
      src/bin/dhcp6/tests/fqdn_unittest.cc
      src/bin/dhcp6/tests/get_config_unittest.cc
          Updated tests
      ce14110b
    • Thomas Markwalder's avatar
      [#35,!517] Rework kea-dhcp4 parsing and server · 256feda6
      Thomas Markwalder authored
      src/bin/dhcp4/ctrl_dhcp4_srv.cc
          Removed setting D2ClientCfg fetch function
      
      src/bin/dhcp4/dhcp4_lexer.ll
      src/bin/dhcp4/dhcp4_parser.yy
          ddns-send-updates
          ddns-override-no-update
          ddns-override-client-update
          ddns-replace-client-name
          ddns-generated-prefix
          ddns-qualifying-suffix
              - added to DHCP4,SHARED_NETWORK,SUBNET4
      
          hostname-char-set
          hostname-char-replacement
              - added to SHARED_NETWORK,SUBNET4
      
      src/bin/dhcp4/dhcp4_srv.cc
      
          Dhcpv4Srv::processClientFqdnOption()
          Dhcpv4Srv::processHostnameOption()
          Dhcpv4Srv::assignLease()
              Use scoped DdnsParams from context to make decisions, pass
              into D2ClientMgr functions, and supply hostname sanitizer
      
      src/bin/dhcp4/json_config_parser.cc
          configureDhcp4Server()
          - use SrvConfig::moveDdnsParams() to move dhcp-ddns parameters
          - handle new "ddns-" globals
      
      src/bin/dhcp4/tests/config_parser_unittest.cc
      src/bin/dhcp4/tests/d2_unittest.cc
      src/bin/dhcp4/tests/dhcp4_test_utils.cc
      src/bin/dhcp4/tests/fqdn_unittest.cc
      src/bin/dhcp4/tests/get_config_unittest.cc
          Updated and new tests
      256feda6
  2. 16 Aug, 2019 2 commits
    • Thomas Markwalder's avatar
      [#730,!2] Addressed review comments · 27fbe6f4
      Thomas Markwalder authored
      ChangeLog - added an entry
      
      src/bin/dhcp4/tests/fqdn_unittest.cc
          TEST_F(NameDhcpv4SrvTest, serverUpdateMalformedHostname) - added
          commentary
      
      src/lib/exceptions/isc_assert.h
          commentary changes
      
      src/lib/exceptions/tests/exceptions_unittest.cc
          TEST(IscThrowAssert, checkMessage) - replace use of explicit line number
      27fbe6f4
    • Thomas Markwalder's avatar
      [#730,!2] Corrected assertion failure on malformed hostname from kea-dhcp4 · 9260b6d9
      Thomas Markwalder authored
      src/lib/exceptions/isc_assert.h
          New file that defines isc_assert_throw()
      
      src/lib/exceptions/Makefile.am
          added isc_asssert.h
      
      src/lib/exceptions/tests/exceptions_unittest.cc
          TEST(IscThrowAssert, checkMessage) - new test
      
      src/lib/dns/labelsequence.cc
      src/lib/dns/name.cc
          Replaced assert() calls with isc_throw_assert() calls
      
      src/lib/dns/tests/name_unittest.cc
          TEST_F(NameTest, unexpectedParseError) - new unit test
          for hostname option content based on fuzz test failure
      
      src/lib/dhcp_ddns/ncr_msg.cc
          Removed unnecessary include of dns/name.h
      
      src/bin/dhcp4/dhcp4_srv.cc
          Dhcpv4Srv::processHostnameOption() - added try catch
          around OptionDataTypeUtil::getLabelCount() call
      
      src/bin/dhcp4/dhcp4_messages.*
          added new log message DHCP4_CLIENT_HOSTNAME_MALFORMED
      
      src/bin/dhcp4/tests/fqdn_unittest.cc
          TEST_F(NameDhcpv4SrvTest, serverUpdateMalformedHostname) -
          renamed test and augmented it to include the packet of death
          produced by fuzz testing.
      9260b6d9
  3. 19 Jun, 2019 1 commit
  4. 13 Jun, 2019 1 commit
  5. 28 May, 2019 1 commit
  6. 16 Jan, 2019 2 commits
  7. 04 Dec, 2018 2 commits
  8. 20 Nov, 2018 1 commit
  9. 27 Jul, 2018 4 commits
    • Tomek Mrugalski's avatar
      [5680] Changes after review · 32466ab3
      Tomek Mrugalski authored
      32466ab3
    • Thomas Markwalder's avatar
      [5680] kea-dhcp4 supports client FQDN name sanitizing · 8ac1c13d
      Thomas Markwalder authored
      src/lib/dhcpsrv/d2_client_mgr.h
          D2ClientMgr::adjustDomainName() - added logic to
          sanitize the inbound FQDN name when configured to do so
      
      src/lib/dhcpsrv/tests/d2_client_unittest.cc
          TEST(D2ClientMgr, sanitizeFqdnV4)
          TEST(D2ClientMgr, sanitizeFqdnV6) - new tests
      
      src/bin/dhcp4/tests/fqdn_unittest.cc
          TEST_F(NameDhcpv4SrvTest, sanitizeFqdn) - new test
      8ac1c13d
    • Thomas Markwalder's avatar
      [5680] kea-dhcp4 now uses hostname sanititzer when configured for it · 1825ead4
      Thomas Markwalder authored
      src/bin/dhcp4/dhcp4_srv.cc
          Dhcpv4Srv::processHostnameOption() - sanitizes client hostname
          if configured to do so
      
      src/bin/dhcp4/tests/fqdn_unittest.cc
          TEST_F(NameDhcpv4SrvTest, sanitizeHostname) - new test to
          verify hostname sanitizing works as expected
      
      src/lib/dhcpsrv/d2_client_cfg.h
          D2ClientConfig::getHostnameSanitizer() added missing getter
      
      src/lib/dhcpsrv/tests/d2_client_unittest.cc
          TEST(D2ClientConfigTest, constructorsAndAccessors) - updated to
          verify hostname sanitizing stuff
      
      src/lib/util/strutil.cc
          fixed regex compilation issue
      1825ead4
    • Thomas Markwalder's avatar
      [5680] kea-dhcp4/6 now parse hostname-char-set and hostname-char-replacment params · ea3d6bca
      Thomas Markwalder authored
      Added to parsing and parsing unit tests.
      Servers do not yet utilize the values.
      
      Modified:
      
      src/bin/dhcp4/dhcp4_lexer.ll
      src/bin/dhcp4/dhcp4_parser.yy
      
      src/bin/dhcp4/tests/config_parser_unittest.cc
      src/bin/dhcp4/tests/fqdn_unittest.cc
      src/bin/dhcp4/tests/get_config_unittest.
      
      src/bin/dhcp6/dhcp6_lexer.ll
      src/bin/dhcp6/dhcp6_parser.yy
      
      src/bin/dhcp6/tests/config_parser_unittest.cc
      src/bin/dhcp6/tests/fqdn_unittest.cc
      src/bin/dhcp6/tests/get_config_unittest.
      ea3d6bca
  10. 15 Dec, 2017 1 commit
  11. 14 Dec, 2017 1 commit
  12. 03 Oct, 2017 1 commit
  13. 29 Sep, 2017 1 commit
    • Thomas Markwalder's avatar
      [5369] Update kea-dhcp4 unit tests to catch the problem · e2f7a8c9
      Thomas Markwalder authored
      src/bin/dhcp4/tests/fqdn_unittest.cc
          TEST_F(NameDhcpv4SrvTest, processRequestFqdnEmptyDomainName)
          - Added renew cycle to verify DNS is not altered
      
          TEST_F(NameDhcpv4SrvTest, processRequestRenewFqdn)
          TEST_F(NameDhcpv4SrvTest, processRequestRenewHostname)
              New tests to verify clients which renew with a different
              FQDN/hostnames generte a CHG_REMOVE and a CHG_ADD
      e2f7a8c9
  14. 23 Jul, 2017 2 commits
  15. 11 Jan, 2017 2 commits
    • Thomas Markwalder's avatar
      [5033] - kea-dhcp6 now uses new D2ClientConfigParser · 9b20235e
      Thomas Markwalder authored
          src/bin/dhcp6/json_config_parser.cc
              createGlobalDhcp6ConfigParser()
              - added clause to invoke new D2ClientConfigParser to
              set staging config
              - added clause to apply staged D2ClientConfig (formerly done
              by parser commit
      
          src/bin/dhcp6/parser_context.h
          src/bin/dhcp6/parser_context.cc
              aded PARSER_DHCP_DDNS context
      
          src/bin/dhcp4/simple_parser6.h
          src/bin/dhcp4/simple_parser6.cc
              defined SimpleParser6::D2_CLIENT_CONFIG_DEFAULTS
              SimpleParser6::setAllDefaults() - now sets defaults
              for D2ClientConfig
      
          src/bin/dhcp6/tests/d2_unittest.cc
          src/bin/dhcp6/tests/fqdn_unittest.cc
              Updated replace-name-mode values and tests
              (true/false no longer supported)
      
          doc/guide/dhcp6-srv.xml
              Updated, replace-client-name no longer accepts booleans
      9b20235e
    • Thomas Markwalder's avatar
      [5033] - migrated D2ClientConfigParser to SimpleParser, kea-dhcp4 uses it · 85640c19
      Thomas Markwalder authored
      src/bin/dhcp4/json_config_parser.cc
          createGlobalDhcp4ConfigParser()
          - added clause to invoke new D2ClientConfigParser to
          set staging config
          - added clause to apply staged D2ClientConfig (formerly done
          by parser commit
      
      src/bin/dhcp4/parser_context.h
      src/bin/dhcp4/parser_context.cc
          aded PARSER_DHCP_DDNS context
      
      src/bin/dhcp4/simple_parser4.h
      src/bin/dhcp4/simple_parser4.cc
          defined SimpleParser4::D2_CLIENT_CONFIG_DEFAULTS
          SimpleParser4::setAllDefaults() - now sets defaults
          for D2ClientConfig
      
      src/bin/dhcp4/tests/d2_unittest.cc
      src/bin/dhcp4/tests/fqdn_unittest.cc
          Updated replace-name-mode values (true/false no longer supported)
      
      src/lib/dhcpsrv/parsers/dhcp_parsers.h
      src/lib/dhcpsrv/parsers/dhcp_parsers.cc
          D2ClientConfig now derives from SimpleParser
      
      src/lib/dhcpsrv/srv_config.h
      src/lib/dhcpsrv/srv_config.cc
          Added a D2ClientConfigPtr member to SrvConfig.
      
      src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
          Updated tests to set D2 client config defaults
      
      doc/guide/dhcp4-srv.xml
          Updated, replace-client-name no longer accepts booleans
      85640c19
  16. 14 Dec, 2016 1 commit
  17. 12 Sep, 2016 1 commit
  18. 07 Apr, 2016 1 commit
  19. 06 Apr, 2016 1 commit
    • Thomas Markwalder's avatar
      [4259] Addressed review comments · 773659ff
      Thomas Markwalder authored
          Moved string/enum conversion functions inside D2ClientConfig
      
          Changed underscores to hypens in replace-client-name values and changed
          all literal values to lower case.
      
          Fixed minor wording issues in admin guide and new log messages.
      
          Added commentary and extra error logging to unit tests
      
          Added test case for invalid value of replace-client-name
      773659ff
  20. 04 Apr, 2016 2 commits
    • Thomas Markwalder's avatar
      [4259] kea-dhcp4 now supports replace-client-name modes · bc8768e9
      Thomas Markwalder authored
          src/bin/dhcp4/dhcp4_messages.mes
              - Added new log message DHCP4_SUPPLY_HOSTNAME
      
          src/bin/dhcp4/dhcp4_srv.cc
              - Dhcpv4Srv::processClientName() - pushed lack of host option in the
              client request down into processHostoption()
      
              - Dhcpv4Srv::processHostnameOption() - modified to support the new name
              replacement modes
      
          src/bin/dhcp4/tests/fqdn_unittest.cc
              - NameDhcpv4SrvTest:: testReplaceClientNameMode() - new method which
              tests a server's handling of a single client packet for a given
              replace-client-name mode.
      
              - TEST_F(NameDhcpv4SrvTest, replaceClientNameModeTest) - new test which
              exercises the permutations of client packets and replace-client-name
              modes.
      bc8768e9
    • Thomas Markwalder's avatar
      [4259] Converted replace-client-name from boolean to enumeration · d80e28d3
      Thomas Markwalder authored
          The D2 client configuration parameter, replace-client-name, was
          changed from a boolean, to an enumerated list of modes:
      
              "NEVER" - do not alter or supply the client name
              "ALWAYS" - always replace the client name, or supply it if
               not sent by the client
              "WHEN_PRESENT" - replace the client name sent by the client,
               do not supply one otherwise
              "WHEN_NOT_PRESENT" - supply the client name only if one was
              not sent by the client
      
          src/lib/dhcpsrv/d2_client_cfg.cc
          src/lib/dhcpsrv/d2_client_cfg.h
              Added the D2ClientConfig::ReplaceClientNameMode enumeration.
      
          src/lib/dhcpsrv/parsers/dhcp_parsers.cc
              - Alter replace-client-name parsing to parse the mode labels.
              - Maps boolean literals true and false to RCM_WHEN_PRESENT and
              RCM_NEVER respectively
      
          src/bin/dhcp4/dhcp6_srv.cc
          src/bin/dhcp4/dhcp4_srv.cc
          src/lib/dhcpsrv/d2_client_mgr.h
              - Adapted to use the enumeration
      
          src/bin/dhcp4/tests/config_parser_unittest.cc
          src/bin/dhcp4/tests/fqdn_unittest.cc
          src/bin/dhcp6/tests/config_parser_unittest.cc
          src/bin/dhcp6/tests/fqdn_unittest.cc
          src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
          src/lib/dhcpsrv/tests/d2_client_unittest.cc
          src/lib/dhcpsrv/tests/d2_udp_unittest.cc
          src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
              - Alter existing tests to use the enumeration. Note false was replaced
              with RCM_NEVER and true with RCM_WHEN_PRESENT
      d80e28d3
  21. 16 Dec, 2015 1 commit
  22. 26 Oct, 2015 1 commit
  23. 20 Oct, 2015 1 commit
    • Marcin Siodelski's avatar
      [3977] Name change requests are now generated when lease is reused. · 5de74693
      Marcin Siodelski authored
      This change triggered a lot of code refactoring for generating the
      NameChangeRequests. Long story short is that the functions responsible
      for generating NCRs from the lease information have been moved to
      the libdhcpsrv where they better fit and where they may be used
      by both allocation engine and the servers.
      5de74693
  24. 18 Oct, 2015 1 commit
  25. 11 May, 2015 1 commit
    • Marcin Siodelski's avatar
      [3747] Removed spurious check when generating NCRs. · a829b4c3
      Marcin Siodelski authored
      Before creating NCRs the code used to check if there is a match
      between a new and old lease and refused to send NCRs if there was
      no match. This was wrong behavior because the allocation engine
      could be reusing other client's lease in which case there could
      be no match whatsoever and the NCRs should still be generated.
      a829b4c3
  26. 08 May, 2015 2 commits
  27. 05 May, 2015 1 commit
  28. 12 Mar, 2015 2 commits