summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-13 20:26:30 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-13 20:33:49 +0100
commitc3be369faa5f73c3b97c0088876bafdbfef43dae (patch)
tree20de1d39881f77e3099a4c78ae310bd7360f2448 /src/libsystemd
parentee116b54a3d0feb3f724f87ccf3f4cbb647d7e73 (diff)
resolved: extend ResolveHostname() bus call so that it can parse IP addresses
If the hostname passed to ResolveHostname() is actually an IP address that is correctly formatted as string parse it as such, avoid any DNS traffic and return the data in parsed form. This is useful for clients which can simply call the bus function now without caring about the precise formatting of specified hostnames. This mimics getaddrinfo()'s behaviour with the AI_NUMERICHOST flag set. Note that this logic is only implemented for ResolveHostname(), but not for calls such as ResolveRecord(), for which only DNS domain names may be used as input. The "authenticated" flag is set for look-ups of this type, after all no untrusted network traffic is involved.
Diffstat (limited to 'src/libsystemd')
0 files changed, 0 insertions, 0 deletions