update deps; switch to goutils syslog.
This commit is contained in:
@@ -8,8 +8,5 @@ go_library(
|
||||
],
|
||||
importpath = "git.wntrmute.dev/kyle/kdhcp/dhcp",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//log",
|
||||
"@com_github_davecgh_go_spew//spew",
|
||||
],
|
||||
deps = ["@dev_wntrmute_git_kyle_goutils//syslog"],
|
||||
)
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"git.wntrmute.dev/kyle/kdhcp/log"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
log "git.wntrmute.dev/kyle/goutils/syslog"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -127,7 +127,20 @@ func (req *BootRequest) Read(packet []byte) error {
|
||||
}
|
||||
req.FileName = string(bytes.Trim(tempBuf, "\x00"))
|
||||
|
||||
spew.Dump(*req)
|
||||
for {
|
||||
tag, err := buf.ReadByte()
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
err = ReadOption(req, tag, buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user