Fix some bugs in io/link.

Notably fix wrong-sized input datagram blob.