summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/async/client.go
diff options
context:
space:
mode:
authorChristopher Koch <chrisko@google.com>2018-12-28 17:35:48 -0800
committerinsomniac <insomniacslk@users.noreply.github.com>2019-01-09 23:54:01 +0000
commit108ed92e1c9901936541020bc3214533acce77bb (patch)
treef1b8806daa9a4a3d3f105dda78be9afeeb756012 /dhcpv4/async/client.go
parent4d2cfd40eee7dd315385d320534b6c99094449e9 (diff)
dhcpv4: export packet members; remove setters and getters.
Diffstat (limited to 'dhcpv4/async/client.go')
-rw-r--r--dhcpv4/async/client.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/dhcpv4/async/client.go b/dhcpv4/async/client.go
index c37d249..9844180 100644
--- a/dhcpv4/async/client.go
+++ b/dhcpv4/async/client.go
@@ -132,7 +132,7 @@ func (c *Client) senderLoop(ctx context.Context) {
func (c *Client) send(packet *dhcpv4.DHCPv4) {
c.packetsLock.Lock()
- p := c.packets[packet.TransactionID()]
+ p := c.packets[packet.TransactionID]
c.packetsLock.Unlock()
raddr, err := c.remoteAddr()
@@ -174,8 +174,8 @@ func (c *Client) receive(_ *dhcpv4.DHCPv4) {
}
c.packetsLock.Lock()
- if p, ok := c.packets[received.TransactionID()]; ok {
- delete(c.packets, received.TransactionID())
+ if p, ok := c.packets[received.TransactionID]; ok {
+ delete(c.packets, received.TransactionID)
p.Resolve(received)
}
c.packetsLock.Unlock()
@@ -201,7 +201,7 @@ func (c *Client) Send(message *dhcpv4.DHCPv4, modifiers ...dhcpv4.Modifier) *pro
p := promise.NewPromise()
c.packetsLock.Lock()
- c.packets[message.TransactionID()] = p
+ c.packets[message.TransactionID] = p
c.packetsLock.Unlock()
c.sendQueue <- message
return p.Future