summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-30 01:47:48 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-30 01:47:48 +0200
commit0c903ae7db52af8ecad0619ec0da021f951c9c1c (patch)
tree061ff58b04683136395b3694ed5c1260bca398b5 /src/resolve/resolved-link.c
parentd2f47562d5d834339ef3030e345a76a8c6f09c74 (diff)
resolved: follow more closely the recommend timeouts and TTLs from the LLMNR spec
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r--src/resolve/resolved-link.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
index 6ac7c5be98..341cb5aea2 100644
--- a/src/resolve/resolved-link.c
+++ b/src/resolve/resolved-link.c
@@ -25,7 +25,8 @@
#include "strv.h"
#include "resolved-link.h"
-#define DEFAULT_TTL (10)
+/* RFC 4795 Section 2.8. suggests a TTL of 30s by default */
+#define LLMNR_DEFAULT_TTL (30)
static void link_address_add_rrs(LinkAddress *a);
@@ -354,7 +355,7 @@ static void link_address_add_rrs(LinkAddress *a) {
}
a->llmnr_address_rr->a.in_addr = a->in_addr.in;
- a->llmnr_address_rr->ttl = DEFAULT_TTL;
+ a->llmnr_address_rr->ttl = LLMNR_DEFAULT_TTL;
}
if (!a->llmnr_ptr_rr) {
@@ -362,7 +363,7 @@ static void link_address_add_rrs(LinkAddress *a) {
if (r < 0)
goto fail;
- a->llmnr_ptr_rr->ttl = DEFAULT_TTL;
+ a->llmnr_ptr_rr->ttl = LLMNR_DEFAULT_TTL;
}
if (link_address_relevant(a)) {
@@ -397,7 +398,7 @@ static void link_address_add_rrs(LinkAddress *a) {
}
a->llmnr_address_rr->aaaa.in6_addr = a->in_addr.in6;
- a->llmnr_address_rr->ttl = DEFAULT_TTL;
+ a->llmnr_address_rr->ttl = LLMNR_DEFAULT_TTL;
}
if (!a->llmnr_ptr_rr) {
@@ -405,7 +406,7 @@ static void link_address_add_rrs(LinkAddress *a) {
if (r < 0)
goto fail;
- a->llmnr_ptr_rr->ttl = DEFAULT_TTL;
+ a->llmnr_ptr_rr->ttl = LLMNR_DEFAULT_TTL;
}
if (link_address_relevant(a)) {