(ntohs(*(uint16_t*)(buf+4))!=conn->port)||/* remote port */
(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 */
(*(uint32_t*)(buf+6)!=me.sin_addr.s_addr)||/* local address, network order */
(*(uint16_t*)(buf+10)!=me.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,conn->port);
...
...
@@ -717,9 +728,9 @@ int or_handshake_server_process_nonce(connection_t *conn) {