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
b692f234
Commit
b692f234
authored
May 09, 2014
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix DNS failure of cachesize set to zero.
parent
8aa999ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
CHANGELOG
CHANGELOG
+4
-0
src/blockdata.c
src/blockdata.c
+10
-5
No files found.
CHANGELOG
View file @
b692f234
...
...
@@ -11,6 +11,10 @@ version 2.71
Fix DNSSEC validation of ANY queries. Thanks to Marco Davids
for spotting that too.
Fix total DNS failure and 100% CPU use if cachesize set to zero,
regression introduced in 2.69. Thanks to James Hunt and
the Ubuntu crowd for assistance in fixing this.
version 2.70
Fix crash, introduced in 2.69, on TCP request when dnsmasq
...
...
src/blockdata.c
View file @
b692f234
...
...
@@ -25,7 +25,7 @@ static void blockdata_expand(int n)
{
struct
blockdata
*
new
=
whine_malloc
(
n
*
sizeof
(
struct
blockdata
));
if
(
new
)
if
(
n
>
0
&&
n
ew
)
{
int
i
;
...
...
@@ -46,14 +46,19 @@ void blockdata_init(void)
blockdata_alloced
=
0
;
blockdata_count
=
0
;
blockdata_hwm
=
0
;
blockdata_expand
((
daemon
->
cachesize
*
100
)
/
sizeof
(
struct
blockdata
));
/* Note that daemon->cachesize is enforced to have non-zero size if OPT_DNSSEC_VALID is set */
if
(
option_bool
(
OPT_DNSSEC_VALID
))
blockdata_expand
((
daemon
->
cachesize
*
100
)
/
sizeof
(
struct
blockdata
));
}
void
blockdata_report
(
void
)
{
my_syslog
(
LOG_INFO
,
_
(
"DNSSEC memory in use %u, max %u, allocated %u"
),
blockdata_count
*
sizeof
(
struct
blockdata
),
blockdata_hwm
*
sizeof
(
struct
blockdata
),
blockdata_alloced
*
sizeof
(
struct
blockdata
));
if
(
option_bool
(
OPT_DNSSEC_VALID
))
my_syslog
(
LOG_INFO
,
_
(
"DNSSEC memory in use %u, max %u, allocated %u"
),
blockdata_count
*
sizeof
(
struct
blockdata
),
blockdata_hwm
*
sizeof
(
struct
blockdata
),
blockdata_alloced
*
sizeof
(
struct
blockdata
));
}
struct
blockdata
*
blockdata_alloc
(
char
*
data
,
size_t
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