Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
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
nanahira
Dnsmasq
Commits
78c61847
Commit
78c61847
authored
Apr 16, 2015
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auth: correct replies to NS and SOA in .arpa zones.
parent
38440b20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
21 deletions
+38
-21
CHANGELOG
CHANGELOG
+8
-0
src/auth.c
src/auth.c
+30
-21
No files found.
CHANGELOG
View file @
78c61847
...
...
@@ -94,6 +94,14 @@ version 2.73
in the auth-zone declaration. Thanks to Johnny S. Lee
for the bugreport and initial patch.
Fix authoritative DNS code to correctly reply to NS
and SOA queries for .arpa zones for which we are
declared authoritative by means of a subnet in auth-zone.
Previously we provided correct answers to PTR queries
in such zones (including NS and SOA) but not direct
NS and SOA queries. Thanks to Johnny S. Lee for
pointing out the problem.
version 2.72
Add ra-advrouter mode, for RFC-3775 mobile IPv6 support.
...
...
src/auth.c
View file @
78c61847
...
...
@@ -131,24 +131,27 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
continue
;
}
if
(
qtype
==
T_PTR
)
if
((
qtype
==
T_PTR
||
qtype
==
T_SOA
||
qtype
==
T_NS
)
&&
(
flag
=
in_arpa_name_2_addr
(
name
,
&
addr
))
&&
!
local_query
)
{
if
(
!
(
flag
=
in_arpa_name_2_addr
(
name
,
&
addr
)))
continue
;
if
(
!
local_query
)
for
(
zone
=
daemon
->
auth_zones
;
zone
;
zone
=
zone
->
next
)
if
((
subnet
=
find_subnet
(
zone
,
flag
,
&
addr
)))
break
;
if
(
!
zone
)
{
for
(
zone
=
daemon
->
auth_zones
;
zone
;
zone
=
zone
->
next
)
if
((
subnet
=
find_subnet
(
zone
,
flag
,
&
addr
)))
break
;
if
(
!
zone
)
{
auth
=
0
;
continue
;
}
auth
=
0
;
continue
;
}
else
if
(
qtype
==
T_SOA
)
soa
=
1
,
found
=
1
;
else
if
(
qtype
==
T_NS
)
ns
=
1
,
found
=
1
;
}
if
(
qtype
==
T_PTR
&&
flag
)
{
intr
=
NULL
;
if
(
flag
==
F_IPV4
)
...
...
@@ -243,14 +246,20 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
}
cname_restart:
for
(
zone
=
daemon
->
auth_zones
;
zone
;
zone
=
zone
->
next
)
if
(
in_zone
(
zone
,
name
,
&
cut
))
break
;
if
(
!
zone
)
if
(
found
)
/* NS and SOA .arpa requests have set found above. */
cut
=
NULL
;
else
{
auth
=
0
;
continue
;
for
(
zone
=
daemon
->
auth_zones
;
zone
;
zone
=
zone
->
next
)
if
(
in_zone
(
zone
,
name
,
&
cut
))
break
;
if
(
!
zone
)
{
auth
=
0
;
continue
;
}
}
for
(
rec
=
daemon
->
mxnames
;
rec
;
rec
=
rec
->
next
)
...
...
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