mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-01 08:03:31 +01:00
bugfix: parse_addr_port() bites us again -- it returns addr in network order.
svn:r2508
This commit is contained in:
parent
0d0df005ff
commit
572714a458
@ -165,13 +165,13 @@ static rend_service_port_config_t *parse_port_config(const char *string)
|
|||||||
log_fn(LOG_WARN, "Port out of range");
|
log_fn(LOG_WARN, "Port out of range");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
addr = 0x7F000001u; /* Default to 127.0.0.1 */
|
addr = htonl(0x7F000001u); /* Default to 127.0.0.1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
result = tor_malloc(sizeof(rend_service_port_config_t));
|
result = tor_malloc(sizeof(rend_service_port_config_t));
|
||||||
result->virtual_port = virtport;
|
result->virtual_port = virtport;
|
||||||
result->real_port = realport;
|
result->real_port = realport;
|
||||||
result->real_address = addr;
|
result->real_address = ntohl(addr);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user