Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
f81f28d9
Commit
f81f28d9
authored
Jan 03, 2020
by
Zheng Xie
Committed by
Miek Gieben
Jan 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin/cache: update comment to conform to the implementation (#3573)
Signed-off-by:
zheng xie
<
xiez1989@gmail.com
>
parent
e3266d24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
plugin/cache/item.go
plugin/cache/item.go
+6
-1
No files found.
plugin/cache/item.go
View file @
f81f28d9
...
...
@@ -49,7 +49,12 @@ func newItem(m *dns.Msg, now time.Time, d time.Duration) *item {
}
// toMsg turns i into a message, it tailors the reply to m.
// The Authoritative bit is always set to 0, because the answer is from the cache.
// The Authoritative bit should be set to 0, but some client stub resolver implementations, most notably,
// on some legacy systems(e.g. ubuntu 14.04 with glib version 2.20), low-level glibc function `getaddrinfo`
// useb by Python/Ruby/etc.. will discard answers that do not have this bit set.
// So we're forced to always set this to 1; regardless if the answer came from the cache or not.
// On newer systems(e.g. ubuntu 16.04 with glib version 2.23), this issue is resolved.
// So we may set this bit back to 0 in the future ?
func
(
i
*
item
)
toMsg
(
m
*
dns
.
Msg
,
now
time
.
Time
)
*
dns
.
Msg
{
m1
:=
new
(
dns
.
Msg
)
m1
.
SetReply
(
m
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment