File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ Pkt4::pack() {
8585 try {
8686 size_t hw_len = hwaddr_->hwaddr_ .size ();
8787
88+ if (hwaddr_->htype_ == HTYPE_INFINIBAND) {
89+ // According to RFC4390, hlen MUST be zero and chaddr zeroed out.
90+ hw_len = 0 ;
91+ }
92+
8893 buffer_out_.writeUint8 (op_);
8994 buffer_out_.writeUint8 (hwaddr_->htype_ );
9095 buffer_out_.writeUint8 (hw_len < MAX_CHADDR_LEN ?
@@ -481,13 +486,7 @@ void
481486Pkt4::setHWAddrMember (const uint8_t htype, const uint8_t hlen,
482487 const std::vector<uint8_t >& mac_addr,
483488 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 ) ) {
489+ if (mac_addr.empty () && (hlen > 0 ) ) {
491490 isc_throw (OutOfRange, " Invalid HW Address specified" );
492491 }
493492
You can’t perform that action at this time.
0 commit comments