cleanup: start enforcing hton and ntoh on stuff sent over the network
this is a checkpoint before i fix the fact that port is always kept in
network order -- which makes no sense, because network order is different
on different machines, which is the whole point.
svn:r81
(*(uint16_t*)(buf+4)!=conn->port)||/* remote port, network order */
(ntohl(*(uint32_t*)(buf+6))!=conn->local.sin_addr.s_addr)||/* local address */
(*(uint16_t*)(buf+10)!=conn->local.sin_port)||/* local port, network order */
(memcmp(conn->nonce,buf+12,8)))/* nonce */
{
log(LOG_ERR,"Router %s:%u failed to authenticate. Either the key I have is obsolete or they're doing something they're not supposed to.",conn->address,ntohs(conn->port));