diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-03-26 18:06:26 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-04-23 12:01:41 +0200 |
commit | 54e6f97bc9931679aa9b895546621b15e0f464a4 (patch) | |
tree | 2ebb6e370a084956daefa2f66ecb178fd7c7be54 /src/nss-myhostname | |
parent | ce0cedacc4dbfc465797b039b3d3af0cd13b6bd5 (diff) | |
download | systemd-54e6f97bc9931679aa9b895546621b15e0f464a4.tar.gz |
local-addresses: add helper for determining local "outbound" IP addresses
This adds a small helper, similar in style to local_addresses() and
local_gateways() that determines the local "outbound" addresses.
What's an "outbound" address supposed to be? The local IP addresses that
are the most likely used for outbound communication. It's determined
by using connect() towards the default gws on an UDP socket, and then
reading the address of the socket this caused it to be bound to.
This is not the "public" or "external" IP address of the local system,
and is not supposed to be. It's just the local IP addresses that are
likely the ones going to be used by the local IP stack for
communication with other hosts.
Diffstat (limited to 'src/nss-myhostname')
0 files changed, 0 insertions, 0 deletions