nss-myhostname: always resolve the host name "gateway" to the local default gateway

System Internals / systemd - Lennart Poettering [poettering.net] - 3 December 2014 14:48 UTC

This is useful inside of containers or local networks to intrdouce a stable name of the default gateway host (in case of containers usually the host, in case of LANs usually local router).

e9140af nss-myhostname: always resolve the host name "gateway" to the local default gateway
.gitignore | 1 +
Makefile.am | 8 ++
src/libsystemd/sd-rtnl/local-addresses.c | 117 ++++++++++++++++++++++++-
src/libsystemd/sd-rtnl/local-addresses.h | 3 +
src/libsystemd/sd-rtnl/rtnl-message.c | 15 ++++
src/libsystemd/sd-rtnl/test-local-addresses.c | 58 ++++++++++++
src/nss-myhostname/nss-myhostname.c | 78 +++++++++++++----
src/systemd/sd-rtnl.h | 1 +
8 files changed, 258 insertions(+), 23 deletions(-)

Upstream: github.com


  • Share