]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-bus: allow localhost addresses
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 15 Sep 2020 12:49:36 +0000 (14:49 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 15 Sep 2020 14:45:03 +0000 (16:45 +0200)
By settings AI_ADDRCONFIG in hints we cannot for example resolve "localhost"
when the local machine only has a loopback interface. This seems like an
unnecessary restriction, drop it.

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1839007.

TODO
src/libsystemd/sd-bus/sd-bus.c

diff --git a/TODO b/TODO
index 69c05d3d38d60c2013cb4f36402079a3eaee8d5d..76cc74f340300afbac37ccfdc5f6f2f47ae3cf98 100644 (file)
--- a/TODO
+++ b/TODO
@@ -561,6 +561,9 @@ Features:
 * sd-bus: add vtable flag, that may be used to request client creds implicitly
   and asynchronously before dispatching the operation
 
+* sd-bus: parse addresses given in sd_bus_set_addresses immediately and not
+  only when used. Add unit tests.
+
 * make use of ethtool veth peer info in machined, for automatically finding out
   host-side interface pointing to the container.
 
index 272b97e17a419a33f5a5270479586968eb240aeb..015a215c420ae3f6b790cc11e52330ad7b0a952a 100644 (file)
@@ -782,7 +782,6 @@ static int parse_tcp_address(sd_bus *b, const char **p, char **guid) {
         int r;
         struct addrinfo *result, hints = {
                 .ai_socktype = SOCK_STREAM,
-                .ai_flags = AI_ADDRCONFIG,
         };
 
         assert(b);