In the USA, I'm almost positive it is only legal to import if you already have a valid prescription for it. Even then, customs can seize it if they want.
Maybe it doesn't make you smarter, but it makes your brain function better for some very specific memory tasks. I think that such a benefit would be broader than the number recall tasks from the study.
A study showed that "Modafinil significantly reduced error rates in the long delay condition of the visuo-spatial task and in the manipulation conditions." http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=15221200&dopt=Abstract
Maybe it doesn't make you smarter, but it makes your brain function better for some very specific memory tasks. I think that such a benefit would be broader than the number recall tasks from the study.