summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/dhcpv6.go')
-rw-r--r--dhcpv6/dhcpv6.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/dhcpv6/dhcpv6.go b/dhcpv6/dhcpv6.go
index 7505dfc..576293d 100644
--- a/dhcpv6/dhcpv6.go
+++ b/dhcpv6/dhcpv6.go
@@ -79,6 +79,9 @@ func RelayMessageFromBytes(data []byte) (*RelayMessage, error) {
func FromBytes(data []byte) (DHCPv6, error) {
buf := uio.NewBigEndianBuffer(data)
messageType := MessageType(buf.Read8())
+ if buf.Error() != nil {
+ return nil, buf.Error()
+ }
if messageType == MessageTypeRelayForward || messageType == MessageTypeRelayReply {
return RelayMessageFromBytes(data)