diff options
Diffstat (limited to 'dhcpv4/option_parameter_request_list.go')
-rw-r--r-- | dhcpv4/option_parameter_request_list.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dhcpv4/option_parameter_request_list.go b/dhcpv4/option_parameter_request_list.go index d1ad2a1..c246f5c 100644 --- a/dhcpv4/option_parameter_request_list.go +++ b/dhcpv4/option_parameter_request_list.go @@ -21,7 +21,7 @@ func ParseOptParameterRequestList(data []byte) (*OptParameterRequestList, error) buf := uio.NewBigEndianBuffer(data) requestedOpts := make([]OptionCode, 0, buf.Len()) for buf.Len() > 0 { - requestedOpts = append(requestedOpts, OptionCode(buf.Read8())) + requestedOpts = append(requestedOpts, optionCode(buf.Read8())) } return &OptParameterRequestList{RequestedOpts: requestedOpts}, buf.Error() } @@ -35,7 +35,7 @@ func (o *OptParameterRequestList) Code() OptionCode { func (o *OptParameterRequestList) ToBytes() []byte { buf := uio.NewBigEndianBuffer(nil) for _, req := range o.RequestedOpts { - buf.Write8(uint8(req)) + buf.Write8(req.Code()) } return buf.Data() } |