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
1fc02680
Commit
1fc02680
authored
Apr 29, 2014
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do SERVFAIL, therefore continue when searching for DS in TCP path too.
parent
4872aa74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
src/forward.c
src/forward.c
+11
-4
No files found.
src/forward.c
View file @
1fc02680
...
@@ -1453,8 +1453,13 @@ static int tcp_check_for_unsigned_zone(time_t now, struct dns_header *header, s
...
@@ -1453,8 +1453,13 @@ static int tcp_check_for_unsigned_zone(time_t now, struct dns_header *header, s
newhash
=
hash_questions
(
header
,
(
unsigned
int
)
m
,
name
);
newhash
=
hash_questions
(
header
,
(
unsigned
int
)
m
,
name
);
if
(
newhash
&&
memcmp
(
hash
,
newhash
,
HASH_SIZE
)
==
0
)
if
(
newhash
&&
memcmp
(
hash
,
newhash
,
HASH_SIZE
)
==
0
)
{
{
/* Note this trashes all three name workspaces */
/* In this case only, a SERVFAIL reply allows us to continue up the tree, looking for a
status
=
tcp_key_recurse
(
now
,
STAT_NEED_DS_NEG
,
header
,
m
,
class
,
name
,
keyname
,
server
,
keycount
);
suitable NSEC reply to DS queries. */
if
(
RCODE
(
header
)
==
SERVFAIL
)
status
=
STAT_INSECURE
;
else
/* Note this trashes all three name workspaces */
status
=
tcp_key_recurse
(
now
,
STAT_NEED_DS_NEG
,
header
,
m
,
class
,
name
,
keyname
,
server
,
keycount
);
/* We've found a DS which proves the bit of the DNS where the
/* We've found a DS which proves the bit of the DNS where the
original query is, is unsigned, so the answer is OK,
original query is, is unsigned, so the answer is OK,
...
@@ -1830,6 +1835,10 @@ unsigned char *tcp_request(int confd, time_t now,
...
@@ -1830,6 +1835,10 @@ unsigned char *tcp_request(int confd, time_t now,
}
}
*
length
=
htons
(
size
);
*
length
=
htons
(
size
);
/* get query name again for logging - may have been overwritten */
if
(
!
(
gotname
=
extract_request
(
header
,
(
unsigned
int
)
size
,
daemon
->
namebuff
,
&
qtype
)))
strcpy
(
daemon
->
namebuff
,
"query"
);
if
(
!
read_write
(
last_server
->
tcpfd
,
packet
,
size
+
sizeof
(
u16
),
0
)
||
if
(
!
read_write
(
last_server
->
tcpfd
,
packet
,
size
+
sizeof
(
u16
),
0
)
||
!
read_write
(
last_server
->
tcpfd
,
&
c1
,
1
,
1
)
||
!
read_write
(
last_server
->
tcpfd
,
&
c1
,
1
,
1
)
||
...
@@ -1843,8 +1852,6 @@ unsigned char *tcp_request(int confd, time_t now,
...
@@ -1843,8 +1852,6 @@ unsigned char *tcp_request(int confd, time_t now,
m
=
(
c1
<<
8
)
|
c2
;
m
=
(
c1
<<
8
)
|
c2
;
if
(
!
gotname
)
strcpy
(
daemon
->
namebuff
,
"query"
);
if
(
last_server
->
addr
.
sa
.
sa_family
==
AF_INET
)
if
(
last_server
->
addr
.
sa
.
sa_family
==
AF_INET
)
log_query
(
F_SERVER
|
F_IPV4
|
F_FORWARD
,
daemon
->
namebuff
,
log_query
(
F_SERVER
|
F_IPV4
|
F_FORWARD
,
daemon
->
namebuff
,
(
struct
all_addr
*
)
&
last_server
->
addr
.
in
.
sin_addr
,
NULL
);
(
struct
all_addr
*
)
&
last_server
->
addr
.
in
.
sin_addr
,
NULL
);
...
...
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