]> git.ipfire.org Git - thirdparty/kea.git/commit
[5551] kea-dhcp4 now attempts to process packets with truncated VIVSO
authorThomas Markwalder <tmark@isc.org>
Tue, 27 Feb 2018 19:46:40 +0000 (14:46 -0500)
committerThomas Markwalder <tmark@isc.org>
Tue, 27 Feb 2018 19:46:40 +0000 (14:46 -0500)
commitf202ec600b358897bda88f9f9c119b98c7b19a8e
treecdfc509e5c14b6eab8d50554be7320637ceb07cb
parentb4f3640c5534074e827ed14921f14013fb6f1aff
[5551] kea-dhcp4 now attempts to process packets with truncated VIVSO

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
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
src/lib/dhcp/option.h
src/lib/dhcp/option_definition.cc
src/lib/dhcp/option_vendor.cc
src/lib/dhcp/option_vendor.h
src/lib/dhcp/tests/pkt4_unittest.cc
src/lib/dhcp/tests/pkt_captures.h
src/lib/dhcp/tests/pkt_captures4.cc