Skip to content
  • Thomas Markwalder's avatar
    [5551] kea-dhcp4 now attempts to process packets with truncated VIVSO · f202ec60
    Thomas Markwalder authored
    src/lib/dhcp/option.h
        SkipRemainingOptionsError - new error to signal
        that unpacking skipped options
    src/lib/dhcp/option_vendor.cc
        OptionVendor::unpack() - modified to throw
        SkipRemainingOptions on truncated length
    
    src/lib/dhcp/option_definition.cc
        OptionDefinition::optionFactory()
        Added catch-rethrow of SkipRemainginOptionsError
    
    src/bin/dhcp4/dhcp4_messages.mes
        Added DHCP4_PACKET_OPTIONS_SKIPPED log message
    
    src/bin/dhcp4/dhcp4_srv.cc
        Dhcpv4Srv::processPacket() - added explicit catch
        of SkipRemainingOptionsError which logs the error
        but allows the processing to continue.
    
    src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
        TEST_F(Dhcpv4SrvTest, truncatedVIVSOOption) -
        new test to verify skip-options logic for truncated
        vendor option
    
    src/lib/dhcp/tests/pkt4_unittest.cc
        TEST_F(Pkt4Test, truncatedVendorLength) - new
        test that verifies Pkt4 unpacking of truncated VIVSO
    
    src/lib/dhcp/tests/pkt_captures4.cc
        Pkt4Ptr PktCaptures::discoverWithValidVIVSO()
        Pkt4Ptr PktCaptures::discoverWithTruncatedVIVSO() -
        new captured discovers
    f202ec60