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
5782649a
Commit
5782649a
authored
Sep 18, 2014
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug which caused dnsmasq to become unresponsive when an interface goes.
parent
288df49c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
CHANGELOG
CHANGELOG
+4
-0
src/util.c
src/util.c
+13
-3
No files found.
CHANGELOG
View file @
5782649a
...
...
@@ -33,6 +33,10 @@ version 2.72
Fix bug when resulted in NXDOMAIN answers instead of NODATA in
some circumstances.
Fix bug which caused dnsmasq to become unresponsive if it
failed to send packets due to a network interface disappearing.
Thanks to Niels Peen for spotting this.
version 2.71
...
...
src/util.c
View file @
5782649a
...
...
@@ -570,18 +570,28 @@ void bump_maxfd(int fd, int *max)
int
retry_send
(
void
)
{
struct
timespec
waiter
;
/* Linux kernels can return EAGAIN in perpetuity when calling
sendmsg() and the relevant interface has gone. Here we loop
retrying in EAGAIN for 1 second max, to avoid this hanging
dnsmasq. */
static
int
retries
=
0
;
struct
timespec
waiter
;
if
(
errno
==
EAGAIN
||
errno
==
EWOULDBLOCK
)
{
waiter
.
tv_sec
=
0
;
waiter
.
tv_nsec
=
10000
;
nanosleep
(
&
waiter
,
NULL
);
return
1
;
if
(
retries
++
<
1000
)
return
1
;
}
retries
=
0
;
if
(
errno
==
EINTR
)
return
1
;
return
0
;
}
...
...
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