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
e243c072
Commit
e243c072
authored
Feb 06, 2014
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AD bit in queries handled as RFC6840 p5.7
parent
da4f3722
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
src/forward.c
src/forward.c
+0
-6
src/rfc1035.c
src/rfc1035.c
+10
-7
No files found.
src/forward.c
View file @
e243c072
...
...
@@ -249,9 +249,6 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr,
#endif
unsigned
int
gotname
=
extract_request
(
header
,
plen
,
daemon
->
namebuff
,
NULL
);
/* RFC 4035: sect 4.6 para 2 */
header
->
hb4
&=
~
HB4_AD
;
/* may be no servers available. */
if
(
!
daemon
->
servers
)
forward
=
NULL
;
...
...
@@ -1283,9 +1280,6 @@ unsigned char *tcp_request(int confd, time_t now,
if
((
checking_disabled
=
header
->
hb4
&
HB4_CD
))
no_cache_dnssec
=
1
;
/* RFC 4035: sect 4.6 para 2 */
header
->
hb4
&=
~
HB4_AD
;
if
((
gotname
=
extract_request
(
header
,
(
unsigned
int
)
size
,
daemon
->
namebuff
,
&
qtype
)))
{
#ifdef HAVE_AUTH
...
...
src/rfc1035.c
View file @
e243c072
...
...
@@ -1468,7 +1468,7 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
struct
mx_srv_record
*
rec
;
size_t
len
;
/* Don't return AD set
even for local data
if checking disabled. */
/* Don't return AD set if checking disabled. */
if
(
header
->
hb4
&
HB4_CD
)
sec_data
=
0
;
...
...
@@ -2260,17 +2260,20 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
header
->
ancount
=
htons
(
anscount
);
header
->
nscount
=
htons
(
0
);
header
->
arcount
=
htons
(
addncount
);
/* RFC 6840 5.7 */
if
(
header
->
hb4
&
HB4_AD
)
sec_reqd
=
1
;
header
->
hb4
&=
~
HB4_AD
;
len
=
ansp
-
(
unsigned
char
*
)
header
;
if
(
have_pseudoheader
)
{
len
=
add_pseudoheader
(
header
,
len
,
(
unsigned
char
*
)
limit
,
0
,
NULL
,
0
,
sec_reqd
);
if
(
sec_reqd
&&
sec_data
)
header
->
hb4
|=
HB4_AD
;
}
len
=
add_pseudoheader
(
header
,
len
,
(
unsigned
char
*
)
limit
,
0
,
NULL
,
0
,
sec_reqd
);
if
(
sec_reqd
&&
sec_data
)
header
->
hb4
|=
HB4_AD
;
return
len
;
}
...
...
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