summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/option_domain_name.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4/option_domain_name.go')
-rw-r--r--dhcpv4/option_domain_name.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/dhcpv4/option_domain_name.go b/dhcpv4/option_domain_name.go
index 71d7ef1..e876b05 100644
--- a/dhcpv4/option_domain_name.go
+++ b/dhcpv4/option_domain_name.go
@@ -2,10 +2,10 @@ package dhcpv4
import "fmt"
-// This option implements the server domani name option
+// This option implements the domain name option
// https://tools.ietf.org/html/rfc2132
-// OptDomainName represents an option encapsulating the server identifier.
+// OptDomainName represents an option encapsulating the domain name.
type OptDomainName struct {
DomainName string
}
@@ -13,7 +13,7 @@ type OptDomainName struct {
// ParseOptDomainName returns a new OptDomainName from a byte
// stream, or error if any.
func ParseOptDomainName(data []byte) (*OptDomainName, error) {
- if len(data) < 2 {
+ if len(data) < 3 {
return nil, ErrShortByteStream
}
code := OptionCode(data[0])