]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: do not set IP_TTL for extra DNS stub listeners
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Sep 2020 06:10:48 +0000 (15:10 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Sep 2020 14:53:22 +0000 (23:53 +0900)
src/resolve/resolved-dns-stub.c

index fc169ee0ef45f12a36ca4d347c1ffb03cc6ad09d..e6116244588b981d65a18659b56a1dfcc842c16d 100644 (file)
@@ -652,9 +652,8 @@ static int manager_dns_stub_tcp_fd_extra(Manager *m, DNSStubListenerExtra *l) {
         if (r < 0)
                 goto fail;
 
-        r = setsockopt_int(fd, IPPROTO_IP, IP_TTL, 1);
-        if (r < 0)
-                goto fail;
+        /* Do not set IP_TTL for extra DNS stub listners, as the address may not be local and in that
+         * case people may want ttl > 1. */
 
         r = setsockopt_int(fd, IPPROTO_IP, IP_FREEBIND, true);
         if (r < 0)