From 549afba7acaef16d65824e42b7db25adbe3610ed Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Tue, 21 May 2024 23:08:01 +0200 Subject: [PATCH] Don't error when setting too big of a Hwaddr The rest of the logic in Pkt4 seems to truncate it just fine, so saving too big of an address should be safe. --- src/lib/dhcp/pkt4.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lib/dhcp/pkt4.cc b/src/lib/dhcp/pkt4.cc index 7803101245..83bf70d555 100644 --- a/src/lib/dhcp/pkt4.cc +++ b/src/lib/dhcp/pkt4.cc @@ -481,13 +481,7 @@ void Pkt4::setHWAddrMember(const uint8_t htype, const uint8_t hlen, const std::vector& mac_addr, HWAddrPtr& hw_addr) { - /// @todo Rewrite this once support for client-identifier option - /// is implemented (ticket 1228?) - if (hlen > MAX_CHADDR_LEN) { - isc_throw(OutOfRange, "Hardware address (len=" << static_cast(hlen) - << ") too long. Max " << MAX_CHADDR_LEN << " supported."); - - } else if (mac_addr.empty() && (hlen > 0) ) { + if (mac_addr.empty() && (hlen > 0) ) { isc_throw(OutOfRange, "Invalid HW Address specified"); }