net: fix some test bug

Fixes issue 5785.

R=golang-dev, dave
CC=golang-dev
https://codereview.appspot.com/10587043

Committer: Dave Cheney <dave@cheney.net>