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
05f76dab
Commit
05f76dab
authored
May 09, 2017
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't die() on failing to parse lease-script output.
parent
bf05f8ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
src/lease.c
src/lease.c
+1
-8
No files found.
src/lease.c
View file @
05f76dab
...
@@ -133,7 +133,6 @@ static int read_leases(time_t now, FILE *leasestream)
...
@@ -133,7 +133,6 @@ static int read_leases(time_t now, FILE *leasestream)
void
lease_init
(
time_t
now
)
void
lease_init
(
time_t
now
)
{
{
FILE
*
leasestream
;
FILE
*
leasestream
;
int
readok
=
0
;
leases_left
=
daemon
->
dhcp_max
;
leases_left
=
daemon
->
dhcp_max
;
...
@@ -172,7 +171,7 @@ void lease_init(time_t now)
...
@@ -172,7 +171,7 @@ void lease_init(time_t now)
if
(
leasestream
)
if
(
leasestream
)
{
{
if
(
!
(
readok
=
read_leases
(
now
,
leasestream
)
))
if
(
!
read_leases
(
now
,
leasestream
))
my_syslog
(
MS_DHCP
|
LOG_ERR
,
_
(
"failed to parse lease database, invalid line: %s %s %s %s ..."
),
my_syslog
(
MS_DHCP
|
LOG_ERR
,
_
(
"failed to parse lease database, invalid line: %s %s %s %s ..."
),
daemon
->
dhcp_buff3
,
daemon
->
dhcp_buff2
,
daemon
->
dhcp_buff3
,
daemon
->
dhcp_buff2
,
daemon
->
namebuff
,
daemon
->
dhcp_buff
);
daemon
->
namebuff
,
daemon
->
dhcp_buff
);
...
@@ -202,12 +201,6 @@ void lease_init(time_t now)
...
@@ -202,12 +201,6 @@ void lease_init(time_t now)
sprintf
(
daemon
->
dhcp_buff
,
"%d"
,
WEXITSTATUS
(
rc
));
sprintf
(
daemon
->
dhcp_buff
,
"%d"
,
WEXITSTATUS
(
rc
));
die
(
_
(
"lease-init script returned exit code %s"
),
daemon
->
dhcp_buff
,
WEXITSTATUS
(
rc
)
+
EC_INIT_OFFSET
);
die
(
_
(
"lease-init script returned exit code %s"
),
daemon
->
dhcp_buff
,
WEXITSTATUS
(
rc
)
+
EC_INIT_OFFSET
);
}
}
/* Only die if we stopped reading due to a non-parsed line when running script,
this is expected behaviour when reading from a file, if the file was written with IPv6 data
and we are not compiled to understand that. */
if
(
!
readok
)
die
(
_
(
"failed to read lease-init script output"
),
NULL
,
EC_FILE
);
}
}
#endif
#endif
...
...
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