mirror of
https://github.com/danderson/netboot.git
synced 2025-08-11 09:07:12 +02:00
Implement the documented default listening behavior for TFTP.
This commit is contained in:
parent
7f4b62d890
commit
90c89c2bd7
@ -71,6 +71,9 @@ type Server struct {
|
|||||||
// calls Serve to handle TFTP requests. If addr is blank, ":69" is
|
// calls Serve to handle TFTP requests. If addr is blank, ":69" is
|
||||||
// used.
|
// used.
|
||||||
func (s *Server) ListenAndServe(addr string) error {
|
func (s *Server) ListenAndServe(addr string) error {
|
||||||
|
if addr == "" {
|
||||||
|
addr = ":69"
|
||||||
|
}
|
||||||
l, err := net.ListenPacket("udp", addr)
|
l, err := net.ListenPacket("udp", addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user