Skip to content

Commit 549afba

Browse files
committed
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.
1 parent 3db8902 commit 549afba

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/lib/dhcp/pkt4.cc

+1-7
Original file line numberDiff line numberDiff line change
@@ -481,13 +481,7 @@ void
481481
Pkt4::setHWAddrMember(const uint8_t htype, const uint8_t hlen,
482482
const std::vector<uint8_t>& mac_addr,
483483
HWAddrPtr& hw_addr) {
484-
/// @todo Rewrite this once support for client-identifier option
485-
/// is implemented (ticket 1228?)
486-
if (hlen > MAX_CHADDR_LEN) {
487-
isc_throw(OutOfRange, "Hardware address (len=" << static_cast<uint32_t>(hlen)
488-
<< ") too long. Max " << MAX_CHADDR_LEN << " supported.");
489-
490-
} else if (mac_addr.empty() && (hlen > 0) ) {
484+
if (mac_addr.empty() && (hlen > 0) ) {
491485
isc_throw(OutOfRange, "Invalid HW Address specified");
492486
}
493487

0 commit comments

Comments
 (0)