code: func dialUDP(network, addr string, timeout time.Duration, mark int) (*net.UDPConn, error) {
  	d := net.Dialer{Timeout: timeout}
  	conn, err := d.Dial(network, addr)
  	if err != nil {
  		return nil, err
  	}
  
  	udpConn, ok := conn.(*net.UDPConn)
  	if !ok {
  		conn.Close()
  		return nil, errors.New("dial did not return a *net.UDPConn")
  	}
  	if mark == 0 {
  		return udpConn, nil
  	}
  
  	f, err := udpConn.File()
  	if err != nil {
  		udpConn.Close()
  		return nil, err
  	}
  	defer f.Close()
  
  	fd := int(f.Fd())
  
  	// Calling File results in the socket being set to blocking mode.
  	// We need to undo this.
  	if err := syscall.SetNonblock(fd, true); err != nil {
  		udpConn.Close()
  		return nil, err
  	}
  
  	if err := setSocketMark(fd, mark); err != nil {
  		udpConn.Close()
  		return nil, err
  	}
  
  	return udpConn, nil
  }
docs: // dialUDP dials a UDP connection to the specified host and sets marking on the
  // socket. A mark of zero results in a normal (non-marked) connection.