Commit 5db69a2 1 parent 83405d5 commit 5db69a2 Copy full SHA for 5db69a2
File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ Pkt4::pack() {
85
85
try {
86
86
size_t hw_len = hwaddr_->hwaddr_ .size ();
87
87
88
+ if (hwaddr_->htype_ == HTYPE_INFINIBAND) {
89
+ // According to RFC4390, hlen MUST be zero and chaddr zeroed out.
90
+ hw_len = 0 ;
91
+ }
92
+
88
93
buffer_out_.writeUint8 (op_);
89
94
buffer_out_.writeUint8 (hwaddr_->htype_ );
90
95
buffer_out_.writeUint8 (hw_len < MAX_CHADDR_LEN ?
@@ -481,13 +486,7 @@ void
481
486
Pkt4::setHWAddrMember (const uint8_t htype, const uint8_t hlen,
482
487
const std::vector<uint8_t >& mac_addr,
483
488
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 ) ) {
491
490
isc_throw (OutOfRange, " Invalid HW Address specified" );
492
491
}
493
492
You can’t perform that action at this time.
0 commit comments