-
- Downloads
addr: Refactor is_local_addr() to support IPv6
Series of changes:
1. Rename function to reflect the namespace of the file.
2. Use the new last resolved cache instead of the unused
last_resolved_addr_v4 (which is also removed in this commit).
3. Make the entire code base use the new resolved_addr_is_local() function.
You will notice that this function uses /24 to differentiate subnets where the
rest of tor uses /16 (including documentation of EnforceDistinctSubnets).
Ticket #40009 has been opened for that.
But that the moment, the function keeps looking at /24.
Part of #33233
Signed-off-by:
David Goulet <dgoulet@torproject.org>
Showing
- src/app/config/resolve_addr.c 35 additions, 21 deletionssrc/app/config/resolve_addr.c
- src/app/config/resolve_addr.h 1 addition, 1 deletionsrc/app/config/resolve_addr.h
- src/core/or/channeltls.c 3 additions, 3 deletionssrc/core/or/channeltls.c
- src/feature/dircache/dircache.c 1 addition, 1 deletionsrc/feature/dircache/dircache.c
- src/test/test_channeltls.c 16 additions, 16 deletionssrc/test/test_channeltls.c
Loading
Please register or sign in to comment