Age | Commit message (Collapse) | Author |
|
Pass the IPv4 before the IPv6 like all our other interfaces.
Changes unreleased code related to #40043.
Closes #40045
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
This changes a LOT of code but in the end, behavior is the same.
Unfortunately, many functions had to be changed to accomodate but in majority
of cases, to become simpler.
Functions are also removed specifically those that were there to convert an
IPv4 as a host format to a tor_addr_t. Those are not needed anymore.
The IPv4 address field has been standardized to "ipv4_addr", the ORPort to
"ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport".
This is related to Sponsor 55 work that adds IPv6 support for relays and this
work is needed in order to have a common interface between IPv4 and IPv6.
Closes #40043.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
In practice, there will be at most one ipv4 address and ipv6 address
for now, but this code is designed to not care which address is
which until forced to do so.
This patch does not yet actually create extend_info_t objects with
multiple addresses.
Closes #34069.
|
|
|
|
Rewrite format_node_description() and router_get_verbose_nickname() to
use strlcpy() and strlcat(). The previous implementation used memcpy()
and pointer arithmetic, which was error-prone.
Closes ticket 31545. This is CID 1452819.
|
|
Part of 21003.
|
|
Also prepare for unit tests.
Part of 21003.
|
|
The Named flag is deprecated. Removing support from the formatting code
simplifies the unit tests.
Part of 21003.
|
|
The declaration was in nodelist/routerinfo.h, but the implementation
was in nodelist/describe.h.
Part of 21003.
|
|
|
|
Make them only include the headers that they needed, and sort their
headers while we're at it.
|
|
|
|
Note that I haven't separated the headers yet (there's still an
|