[GH-ISSUE #60] TTL cannot be set per record #192

Closed
opened 2026-03-01 17:24:28 +03:00 by kerem · 3 comments
Owner

Originally created by @mark-kubacki on GitHub (Jan 9, 2015).
Original GitHub issue: https://github.com/abh/geodns/issues/60

TTLs for records are being ignored; GeoDNS does only take into account the zone's default TTL.

For example, given test.example.com, lines 32–35 with the default TTL of 600 and a configured TTL of 601 for bar.test.example.com,
I expect this:

$ ./geodns --port=3053 &

$ dig @127.0.0.1 -p 3053 a bar.test.example.com | grep -A 1 -F "ANSWER SECTION" | cut -f 2 -d ' '
ANSWER
601

$ dig @127.0.0.1 -p 3053 cname cname-long-ttl.test.example.com | grep -A 1 -F "ANSWER SECTION" | cut -f 2 -d ' '
ANSWER
86400

$ kill %1

But the result is the default TTL:

ANSWER
600

ANSWER
600
Originally created by @mark-kubacki on GitHub (Jan 9, 2015). Original GitHub issue: https://github.com/abh/geodns/issues/60 TTLs for records are being ignored; **GeoDNS** does only take into account the zone's default TTL. For example, given [test.example.com, lines 32–35](https://github.com/abh/geodns/blob/c4a5ec7f1040197eda4ced46cfb5f25af03cb4a5/dns/test.example.com.json#L32-L35) with the default TTL of 600 and a configured TTL of 601 for **bar.test.example.com**, I expect this: ``` bash $ ./geodns --port=3053 & $ dig @127.0.0.1 -p 3053 a bar.test.example.com | grep -A 1 -F "ANSWER SECTION" | cut -f 2 -d ' ' ANSWER 601 $ dig @127.0.0.1 -p 3053 cname cname-long-ttl.test.example.com | grep -A 1 -F "ANSWER SECTION" | cut -f 2 -d ' ' ANSWER 86400 $ kill %1 ``` But the result is the default TTL: ``` bash ANSWER 600 ANSWER 600 ```
kerem closed this issue 2026-03-01 17:24:28 +03:00
Author
Owner

@abh commented on GitHub (Jan 31, 2015):

That's surprising; I thought I had tests for this. I'll have a look, thank you!

<!-- gh-comment-id:72313427 --> @abh commented on GitHub (Jan 31, 2015): That's surprising; I thought I had tests for this. I'll have a look, thank you!
Author
Owner

@abh commented on GitHub (Feb 19, 2015):

Thank you again for pointing this out.

<!-- gh-comment-id:75014363 --> @abh commented on GitHub (Feb 19, 2015): Thank you again for pointing this out.
Author
Owner

@mark-kubacki commented on GitHub (Feb 19, 2015):

Thank you!

<!-- gh-comment-id:75063426 --> @mark-kubacki commented on GitHub (Feb 19, 2015): Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/geodns#192
No description provided.