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
5d3b87a4
Commit
5d3b87a4
authored
Jan 20, 2014
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better handling of truncated DNSSEC replies.
parent
72ae2f3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
src/dnsmasq.h
src/dnsmasq.h
+1
-0
src/forward.c
src/forward.c
+13
-13
No files found.
src/dnsmasq.h
View file @
5d3b87a4
...
...
@@ -519,6 +519,7 @@ struct hostsfile {
#define STAT_BOGUS 3
#define STAT_NEED_DS 4
#define STAT_NEED_KEY 5
#define STAT_TRUNCATED 6
#define FREC_NOREBIND 1
#define FREC_CHECKING_DISABLED 2
...
...
src/forward.c
View file @
5d3b87a4
...
...
@@ -751,14 +751,11 @@ void reply_query(int fd, int family, time_t now)
if
(
header
->
hb3
&
HB3_TC
)
{
/* Truncated answer can't be validated.
The client will retry over TCP, but if this is an answer to a
DNSSEC-generated query, we have a problem. Should really re-send
over TCP. No-one with any sense will make a DNSKEY or DS RRset
exceed 4096, so this may not be a real problem. Just log
for now. */
if
(
forward
->
flags
&
(
FREC_DNSKEY_QUERY
|
FREC_DS_QUERY
))
my_syslog
(
LOG_ERR
,
_
(
"Reply to DNSSEC query truncated - validation fails."
));
status
=
STAT_INSECURE
;
If this is an answer to a DNSSEC-generated query, we still
need to get the client to retry over TCP, so return
an answer with the TC bit set, even if the actual answer fits.
*/
status
=
STAT_TRUNCATED
;
}
else
if
(
forward
->
flags
&
FREC_DNSKEY_QUERY
)
status
=
dnssec_validate_by_ds
(
now
,
header
,
n
,
daemon
->
namebuff
,
daemon
->
keyname
,
forward
->
class
);
...
...
@@ -891,12 +888,15 @@ void reply_query(int fd, int family, time_t now)
status
=
STAT_INSECURE
;
}
}
log_query
(
F_KEYTAG
|
F_SECSTAT
,
"result"
,
NULL
,
status
==
STAT_SECURE
?
"SECURE"
:
(
status
==
STAT_INSECURE
?
"INSECURE"
:
"BOGUS"
));
if
(
status
==
STAT_TRUNCATED
)
header
->
hb3
|=
HB3_TC
;
else
log_query
(
F_KEYTAG
|
F_SECSTAT
,
"result"
,
NULL
,
status
==
STAT_SECURE
?
"SECURE"
:
(
status
==
STAT_INSECURE
?
"INSECURE"
:
"BOGUS"
));
no_cache_dnssec
=
0
;
if
(
status
==
STAT_SECURE
)
cache_secure
=
1
;
else
if
(
status
==
STAT_BOGUS
)
...
...
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