Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
69
Issues
69
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
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
ISC Open Source Projects
dhcp
Commits
583cab3c
Commit
583cab3c
authored
Jan 25, 2000
by
Ted Lemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix binding support.
parent
d00855e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
server/mdb.c
server/mdb.c
+27
-16
No files found.
server/mdb.c
View file @
583cab3c
...
...
@@ -22,7 +22,7 @@
#ifndef lint
static
char
copyright
[]
=
"$Id: mdb.c,v 1.2
4 2000/01/08 01:48:42
mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: mdb.c,v 1.2
5 2000/01/25 01:42:48
mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
...
...
@@ -132,11 +132,9 @@ isc_result_t enter_host (hd, dynamicp, commit)
(
esp
->
data
.
option
->
option
->
code
==
DHO_DHCP_CLIENT_IDENTIFIER
))
{
evaluate_option_cache
(
&
hd
->
client_identifier
,
(
struct
packet
*
)
0
,
(
struct
lease
*
)
0
,
(
struct
option_state
*
)
0
,
(
struct
option_state
*
)
0
,
(
&
hd
->
client_identifier
,
(
struct
packet
*
)
0
,
(
struct
lease
*
)
0
,
(
struct
option_state
*
)
0
,
(
struct
option_state
*
)
0
,
&
global_scope
,
esp
->
data
.
option
);
break
;
}
...
...
@@ -361,7 +359,7 @@ struct subnet *find_host_for_network (host, addr, share)
(
struct
lease
*
)
0
,
(
struct
option_state
*
)
0
,
(
struct
option_state
*
)
0
,
hp
->
fixed_addr
))
&
global_scope
,
hp
->
fixed_addr
))
continue
;
for
(
i
=
0
;
i
<
fixed_addr
.
len
;
i
+=
4
)
{
ip_address
.
len
=
4
;
...
...
@@ -886,6 +884,10 @@ int supersede_lease (comp, lease, commit)
comp
->
hardware_addr
=
lease
->
hardware_addr
;
comp
->
flags
=
((
lease
->
flags
&
~
PERSISTENT_FLAGS
)
|
(
comp
->
flags
&
~
EPHEMERAL_FLAGS
));
if
(
comp
->
scope
.
bindings
)
free_bindings
(
&
comp
->
scope
,
"supersede_lease"
);
comp
->
scope
.
bindings
=
lease
->
scope
.
bindings
;
lease
->
scope
.
bindings
=
(
struct
binding
*
)
0
;
if
(
lease
->
on_expiry
)
{
if
(
comp
->
on_expiry
)
...
...
@@ -1036,6 +1038,7 @@ int supersede_lease (comp, lease, commit)
execute_statements
((
struct
packet
*
)
0
,
lease
,
(
struct
option_state
*
)
0
,
(
struct
option_state
*
)
0
,
/* XXX */
&
lease
->
scope
,
comp
->
on_expiry
);
executable_statement_dereference
(
&
comp
->
on_expiry
,
"supersede_lease"
);
...
...
@@ -1108,18 +1111,15 @@ void release_lease (lease, packet)
{
struct
lease
lt
;
#if defined (NSUPDATE) && 0
nsupdate
(
lease
,
lease
->
state
,
packet
,
DELETE
);
#endif
/* If there are statements to execute when the lease is
released, execute them. */
if
(
lease
->
on_release
)
{
execute_statements
(
packet
,
lease
,
packet
->
options
,
(
struct
option_state
*
)
0
,
/* XXX */
lease
->
on_release
);
executable_statement_dereference
(
&
lease
->
on_release
,
"dhcprelease"
);
&
lease
->
scope
,
lease
->
on_release
);
if
(
lease
->
on_release
)
executable_statement_dereference
(
&
lease
->
on_release
,
"dhcprelease"
);
}
/* We do either the on_release or the on_expiry events, but
...
...
@@ -1138,6 +1138,9 @@ void release_lease (lease, packet)
lt
.
on_release
=
0
;
lt
.
on_commit
=
0
;
/* Blow away any bindings. */
lt
.
scope
.
bindings
=
(
struct
binding
*
)
0
;
lt
.
ends
=
cur_time
;
lt
.
billing_class
=
(
struct
class
*
)
0
;
supersede_lease
(
lease
,
&
lt
,
1
);
...
...
@@ -1162,6 +1165,9 @@ void abandon_lease (lease, message)
lt
.
on_release
=
0
;
lt
.
on_commit
=
0
;
/* Blow away any bindings. */
lt
.
scope
.
bindings
=
(
struct
binding
*
)
0
;
lt
.
ends
=
cur_time
;
/* XXX */
log_error
(
"Abandoning IP address %s: %s"
,
piaddr
(
lease
->
ip_addr
),
message
);
...
...
@@ -1187,6 +1193,9 @@ void dissociate_lease (lease)
lt
.
on_release
=
0
;
lt
.
on_commit
=
0
;
/* Blow away any bindings. */
lt
.
scope
.
bindings
=
(
struct
binding
*
)
0
;
if
(
lt
.
ends
>
cur_time
)
lt
.
ends
=
cur_time
;
lt
.
hardware_addr
.
hlen
=
0
;
...
...
@@ -1217,9 +1226,11 @@ void pool_timer (vpool)
execute_statements
((
struct
packet
*
)
0
,
lease
,
(
struct
option_state
*
)
0
,
(
struct
option_state
*
)
0
,
/* XXX */
&
lease
->
scope
,
lease
->
on_expiry
);
executable_statement_dereference
(
&
lease
->
on_expiry
,
"pool_timer"
);
if
(
lease
->
on_expiry
)
executable_statement_dereference
(
&
lease
->
on_expiry
,
"pool_timer"
);
}
/* If there's an on_release event, blow it away. */
...
...
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