Skip to content
  • Thomas Markwalder's avatar
    [#900,!561] kea-dhcp4/6 now quietly drop empty or all-null string options · a917e4ae
    Thomas Markwalder authored
    src/lib/dhcp/option.h
        class SkipThisOptionError - new exception type
    
    src/lib/dhcp/libdhcp++.cc
        LibDHCP::unpackOptions4()
        LibDHCP::unpackOptions6() - explicitly catches and handles
        SkipThisOptionError expceptions
    
    src/lib/dhcp/option_definition.cc
        OptionDefinition::optionFactory() - now rethrows SkipThisOptionError
    
    src/lib/dhcp/option_int.h
        OptionInt::unpack() - altered ambiguous exception text
    
    src/lib/dhcp/option_int_array.h
        OptionIntArray::unpack() - altered ambiguous exception text
    
    src/lib/dhcp/option_string.cc
        OptionString::unpack() - now throws SkipThisOptionError if option, once
        trimmed, is empty
    
    src/lib/dhcp/tests/option_string_unittest.cc
        Updated tests
    
    src/lib/dhcp/tests/pkt4_unittest.cc
        TEST_F(Pkt4Test, testSkipThisOptionError) - new test
    
    src/lib/dhcp/tests/pkt6_unittest.cc
        TEST_F(Pkt6Test, testSkipThisOptionError) - new test
    
    src/lib/dhcpsrv/tests/cfg_option_unittest.cc
        Updated expected exception text
    
    src/lib/testutils/gtest_utils.h
        Added two macros to emit exception info on throws.
        #define EXPECT_NO_THROW_LOG(statement)
        #define ASSERT_NO_THROW_LOG(statement)
    a917e4ae