summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/nclient4/client.go
diff options
context:
space:
mode:
authorHu Jun <hujun.work@gmail.com>2020-06-18 10:53:18 -0700
committerHu Jun <hujun.work@gmail.com>2020-06-18 10:53:18 -0700
commiteb6bb0498f94a5d396a03d9ec5b028703071e2d7 (patch)
tree18d63709a486df4f96c16d41aef6a8f2e1d49e6a /dhcpv4/nclient4/client.go
parent42e8d6f8badf5831edf0b8a11f03273031e4949e (diff)
- move the example to a separate file example_lease_test.go
- fix a few more lint complains Signed-off-by: Hu Jun <hujun.work@gmail.com>
Diffstat (limited to 'dhcpv4/nclient4/client.go')
-rw-r--r--dhcpv4/nclient4/client.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/dhcpv4/nclient4/client.go b/dhcpv4/nclient4/client.go
index d326ddb..414a48e 100644
--- a/dhcpv4/nclient4/client.go
+++ b/dhcpv4/nclient4/client.go
@@ -166,7 +166,7 @@ type Client struct {
//clientIdOptions is a list of DHCPv4 option code that DHCP server used to
//identify client other than the HWAddress,
//like client-id, option82/remote-id..etc
- clientIdOptions dhcpv4.OptionCodeList
+ clientIDOptions dhcpv4.OptionCodeList
//lease info after DORA, nil before DORA
lease *DHCPv4ClientLease
@@ -201,7 +201,7 @@ func new(iface string, conn net.PacketConn, ifaceHWAddr net.HardwareAddr, opts .
pending: make(map[dhcpv4.TransactionID]*pendingCh),
lease: nil,
leaseApplyHandler: defaultLeaseApplyHandler,
- clientIdOptions: dhcpv4.OptionCodeList{},
+ clientIDOptions: dhcpv4.OptionCodeList{},
ifName: iface,
}
@@ -538,7 +538,7 @@ var errDeadlineExceeded = errors.New("INTERNAL ERROR: deadline exceeded")
func (c *Client) SendAndRead(ctx context.Context, dest *net.UDPAddr, p *dhcpv4.DHCPv4, match Matcher) (*dhcpv4.DHCPv4, error) {
var response *dhcpv4.DHCPv4
//check if the request packet has all options required by c.clientIdOptions
- for _, optioncode := range c.clientIdOptions {
+ for _, optioncode := range c.clientIDOptions {
if len(p.Options.Get(optioncode)) == 0 {
err := fmt.Errorf("Option %v required for client identification is missing in request", optioncode)
return nil, err