diff options
author | Canwu Yao <yaocanwu@gmail.com> | 2021-01-21 01:24:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 17:24:23 +0000 |
commit | cc9239ac62943a78e89ef4880c8ebdd0ca9ae21e (patch) | |
tree | c597a9752f10a431f725e32ba78e0803abb09112 /dhcpv4/nclient4/client.go | |
parent | 4de412bc85d81d821ff33c97636f26f30c8c4911 (diff) |
nclient4: WithUnicast default port should be 68 (#403)
Signed-off-by: yaocw2020 <yaocanwu@gmail.com>
Diffstat (limited to 'dhcpv4/nclient4/client.go')
-rw-r--r-- | dhcpv4/nclient4/client.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcpv4/nclient4/client.go b/dhcpv4/nclient4/client.go index 8fedf4a..8d970ef 100644 --- a/dhcpv4/nclient4/client.go +++ b/dhcpv4/nclient4/client.go @@ -352,7 +352,7 @@ func WithLogger(newLogger Logger) ClientOpt { func WithUnicast(srcAddr *net.UDPAddr) ClientOpt { return func(c *Client) (err error) { if srcAddr == nil { - srcAddr = &net.UDPAddr{Port: ServerPort} + srcAddr = &net.UDPAddr{Port: ClientPort} } c.conn, err = net.ListenUDP("udp4", srcAddr) if err != nil { |