Rather than returning -1 and rely on net_errno "somewhere".
net_errno
Clean a bit of code on the way.