Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: Yawning/tor
base: master
head repository: Yawning/tor
compare: bug12377_linux
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 7 files changed
  • 0 comments
  • 1 contributor
Showing with 490 additions and 29 deletions.
  1. +5 −0 changes/bug12377
  2. +2 −0 configure.ac
  3. +5 −0 src/common/address.c
  4. +2 −0 src/common/include.am
  5. +435 −0 src/common/netlink.c
  6. +18 −0 src/common/netlink.h
  7. +23 −29 src/test/test_address.c
@@ -0,0 +1,5 @@
o Minor bugfixes:
- On Linux systems try to use an AF_NETLINK socket to determine the
external interface's IP address, before falling back to the various
older approaches (interface enumeration and then a UDP socket based
hack). Fixes part of #12377. Bugfix on Tor 0.2.3.11-alpha.
@@ -930,6 +930,8 @@ AC_CHECK_HEADERS(
inttypes.h \
limits.h \
linux/types.h \
linux/netlink.h \
linux/rtnetlink.h \
machine/limits.h \
malloc.h \
malloc/malloc.h \
@@ -24,6 +24,7 @@
#include "compat.h"
#include "util.h"
#include "address.h"
#include "netlink.h"
#include "torlog.h"
#include "container.h"
#include "sandbox.h"
@@ -1589,6 +1590,10 @@ get_interface_address6,(int severity, sa_family_t family, tor_addr_t *addr))
smartlist_t *addrs;
tor_assert(addr);

/* Try to do this the routing table aware smart way if possible. */
if (!get_interface_address_netlink(severity, family, addr))
return 0;

/* Try to do this the smart way if possible. */
if ((addrs = get_interface_addresses_raw(severity))) {
int rv = -1;
@@ -60,6 +60,7 @@ LIBOR_A_SOURCES = \
src/common/di_ops.c \
src/common/log.c \
src/common/memarea.c \
src/common/netlink.c \
src/common/util.c \
src/common/util_process.c \
src/common/sandbox.c \
@@ -118,6 +119,7 @@ COMMONHEADERS = \
src/common/crypto_s2k.h \
src/common/di_ops.h \
src/common/memarea.h \
src/common/netlink.h \
src/common/linux_syscalls.inc \
src/common/procmon.h \
src/common/sandbox.h \

No commit comments for this range