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
0f8cb509
Commit
0f8cb509
authored
Nov 08, 2016
by
Miek Gieben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
middleware/file: notify better error reporting
Slightly better errors reporting for failing to sent a notify.
parent
fb7fcff9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
middleware/file/notify.go
middleware/file/notify.go
+8
-3
No files found.
middleware/file/notify.go
View file @
0f8cb509
...
@@ -56,10 +56,12 @@ func notify(zone string, to []string) error {
...
@@ -56,10 +56,12 @@ func notify(zone string, to []string) error {
return
nil
return
nil
}
}
func
notifyAddr
(
c
*
dns
.
Client
,
m
*
dns
.
Msg
,
s
string
)
error
{
func
notifyAddr
(
c
*
dns
.
Client
,
m
*
dns
.
Msg
,
s
string
)
(
err
error
)
{
code
:=
dns
.
RcodeSuccess
ret
:=
new
(
dns
.
Msg
)
code
:=
dns
.
RcodeServerFailure
for
i
:=
0
;
i
<
3
;
i
++
{
for
i
:=
0
;
i
<
3
;
i
++
{
ret
,
_
,
err
:
=
c
.
Exchange
(
m
,
s
)
ret
,
_
,
err
=
c
.
Exchange
(
m
,
s
)
if
err
!=
nil
{
if
err
!=
nil
{
continue
continue
}
}
...
@@ -68,5 +70,8 @@ func notifyAddr(c *dns.Client, m *dns.Msg, s string) error {
...
@@ -68,5 +70,8 @@ func notifyAddr(c *dns.Client, m *dns.Msg, s string) error {
return
nil
return
nil
}
}
}
}
if
err
!=
nil
{
return
err
}
return
fmt
.
Errorf
(
"Notify for zone %q was not accepted by %q: rcode was %q"
,
m
.
Question
[
0
]
.
Name
,
s
,
rcode
.
ToString
(
code
))
return
fmt
.
Errorf
(
"Notify for zone %q was not accepted by %q: rcode was %q"
,
m
.
Question
[
0
]
.
Name
,
s
,
rcode
.
ToString
(
code
))
}
}
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