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
cdbee9a4
Commit
cdbee9a4
authored
Apr 04, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find room to store key-id and digest-type in DS records.
->uid is now overloaded to store key length
parent
7b4ad2eb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
src/cache.c
src/cache.c
+13
-3
src/dnsmasq.h
src/dnsmasq.h
+6
-4
No files found.
src/cache.c
View file @
cdbee9a4
...
...
@@ -240,7 +240,11 @@ static int is_outdated_cname_pointer(struct crec *crecp)
if
(
!
(
crecp
->
flags
&
F_CNAME
))
return
0
;
if
(
crecp
->
addr
.
cname
.
cache
&&
crecp
->
addr
.
cname
.
uid
==
crecp
->
addr
.
cname
.
cache
->
uid
)
/* NB. record may be reused as DS or DNSKEY, where uid is
overloaded for something completely different */
if
(
crecp
->
addr
.
cname
.
cache
&&
(
crecp
->
addr
.
cname
.
cache
->
flags
&
(
F_IPV4
|
F_IPV6
))
&&
crecp
->
addr
.
cname
.
uid
==
crecp
->
addr
.
cname
.
cache
->
uid
)
return
0
;
return
1
;
...
...
@@ -1158,10 +1162,16 @@ void dump_cache(time_t now)
a
=
cache_get_name
(
cache
->
addr
.
cname
.
cache
);
}
#ifdef HAVE_DNSSEC
else
if
(
cache
->
flags
&
(
F_DNSKEY
|
F_DS
)
)
else
if
(
cache
->
flags
&
F_DNSKEY
)
{
a
=
daemon
->
addrbuff
;
sprintf
(
a
,
"%u %u"
,
cache
->
addr
.
key
.
algo
,
cache
->
addr
.
key
.
keylen
);
sprintf
(
a
,
"%3u %u"
,
cache
->
addr
.
key
.
algo
,
cache
->
uid
);
}
else
if
(
cache
->
flags
&
F_DS
)
{
a
=
daemon
->
addrbuff
;
sprintf
(
a
,
"%5u %3u %3u %u"
,
cache
->
addr
.
key
.
flags_or_keyid
,
cache
->
addr
.
key
.
algo
,
cache
->
addr
.
key
.
digest
,
cache
->
uid
);
}
#endif
else
...
...
src/dnsmasq.h
View file @
cdbee9a4
...
...
@@ -305,8 +305,7 @@ struct keydata {
struct
crec
{
struct
crec
*
next
,
*
prev
,
*
hash_next
;
time_t
ttd
;
/* time to die */
int
uid
;
/* union is 16 bytes when doing IPv6, 8 bytes on 32 bit machines without IPv6 */
union
{
struct
all_addr
addr
;
struct
{
...
...
@@ -316,10 +315,13 @@ struct crec {
struct
{
struct
keydata
*
keydata
;
unsigned
char
algo
;
unsigned
char
flags
;
unsigned
short
keylen
;
unsigned
char
digest
;
/* DS only */
unsigned
short
flags_or_keyid
;
/* flags for DNSKEY, keyid for DS */
}
key
;
}
addr
;
time_t
ttd
;
/* time to die */
/* used as keylen if F_DS or F_DNSKEY, index to source for F_HOSTS */
int
uid
;
unsigned
short
flags
;
union
{
char
sname
[
SMALLDNAME
];
...
...
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