summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
authorCanwu Yao <yaocanwu@gmail.com>2021-01-21 01:24:23 +0800
committerGitHub <noreply@github.com>2021-01-20 17:24:23 +0000
commitcc9239ac62943a78e89ef4880c8ebdd0ca9ae21e (patch)
treec597a9752f10a431f725e32ba78e0803abb09112 /dhcpv4
parent4de412bc85d81d821ff33c97636f26f30c8c4911 (diff)
nclient4: WithUnicast default port should be 68 (#403)
Signed-off-by: yaocw2020 <yaocanwu@gmail.com>
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/nclient4/client.go2
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 {