Skip to content

Commit

Permalink
dhcpd: fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Jul 30, 2021
1 parent 26724df commit 1365d8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/dhcpd/v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,11 @@ func (s *v4Server) packetHandler(conn net.PacketConn, peer net.Addr, req *dhcpv4
}

// Despite the fact that server4.NewIPv4UDPConn explicitly sets socket
// options to allow broadcasting, it's also binds the connection to the
// specified interface. On FreeBSD conn.WriteTo causes errors while
// writing to the addresses that belong to another interface. So use
// the broadcast address specific for the binded interface in case the
// server4.Serve method sets it to net.IPv4Bcast.
// options to allow broadcasting, it also binds the connection to a
// specific interface. On FreeBSD conn.WriteTo causes errors while
// writing to the addresses that belong to another interface. So, use
// the broadcast address specific for the binded interface in case
// server4.Server.Serve sets it to net.IPv4Bcast.
if udpPeer.IP.Equal(net.IPv4bcast) {
udpPeer.IP = s.conf.broadcastIP
}
Expand Down

0 comments on commit 1365d8f

Please sign in to comment.