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
64
Issues
64
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
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
bafa7b74
Commit
bafa7b74
authored
Dec 18, 2017
by
Thomas Markwalder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[master] Added --release-on-roam server parameter
Merges in 46849.
parent
e8b058cf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
9 deletions
+60
-9
RELNOTES
RELNOTES
+15
-8
includes/dhcpd.h
includes/dhcpd.h
+5
-0
server/dhcpd.c
server/dhcpd.c
+16
-0
server/dhcpd.conf.5
server/dhcpd.conf.5
+21
-0
server/dhcpv6.c
server/dhcpv6.c
+2
-1
server/stables.c
server/stables.c
+1
-0
No files found.
RELNOTES
View file @
bafa7b74
...
...
@@ -184,19 +184,26 @@ dhcp-users@lists.isc.org.
doing
load
balancing
within
failover
.
[
ISC
-
Bugs
#
45364
]
-
If
the
server
detects
that
a
DHCPv6
client
(
IAID
+
DUID
)
has
roamed
to
a
new
network
,
it
will
now
automatically
release
pre
-
existing
leases
on
the
old
network
.
When
this
occurs
the
server
will
emit
a
log
statement
:
-
Added
--
release
-
on
-
roam
to
dhcpd
server
.
When
enabled
and
the
server
detects
that
a
DHCPv6
client
(
IAID
+
DUID
)
has
roamed
to
a
new
network
,
it
will
release
the
pre
-
existing
leases
on
the
old
network
and
emit
a
log
statement
similar
to
the
following
:
"Client: <id> roamed to new network, releasing lease: <address>"
The
server
will
carry
out
all
of
the
same
steps
that
would
normally
occur
when
a
client
explicitly
releases
a
lease
.
Prior
to
this
the
server
simply
dropped
the
pre
-
existing
leases
on
the
floor
without
doing
the
appropriate
clean
-
up
.
Clients
that
need
leases
in
multiple
networks
must
supply
a
unique
IAID
in
each
IA
.
Thanks
to
Fernando
Soto
from
BlueCat
Networks
for
reporting
the
issue
.
when
a
client
explicitly
releases
a
lease
.
This
behavior
is
disabled
by
default
and
may
only
be
specified
globally
.
Prior
to
this
the
server
renders
the
leases
unavailable
until
they
expire
or
the
server
is
restarted
.
Clients
that
need
leases
in
multiple
networks
must
supply
a
unique
IAID
in
each
IA
.
When
release
-
on
-
roam
is
disabled
(
the
default
)
the
server
maintains
the
prior
behavior
of
making
such
leases
unavailable
until
they
expire
or
the
server
is
restarted
.
Clients
that
need
leases
in
multiple
networks
must
supply
a
unique
IAID
in
each
IA
.
This
parameter
may
only
be
specified
at
the
global
level
.
Thanks
to
Fernando
Soto
from
BlueCat
Networks
for
suggesting
this
change
.
[
ISC
-
Bugs
#
44576
]
[
ISC
-
Bugs
#
46849
]
-
The
ability
of
the
server
to
send
back
dhcp6
.
vendor
-
opts
values
has
been
restored
.
A
change
in
4.3.5
(
see
#
29246
)
which
enabled
it
to
send
back
the
...
...
includes/dhcpd.h
View file @
bafa7b74
...
...
@@ -809,6 +809,7 @@ struct lease_state {
#define SV_DDNS_DUAL_STACK_MIXED_MODE 92
#define SV_DDNS_GUARD_ID_MUST_MATCH 93
#define SV_DDNS_OTHER_GUARD_IS_DYNAMIC 94
#define SV_RELEASE_ON_ROAM 95
#if !defined (DEFAULT_PING_TIMEOUT)
# define DEFAULT_PING_TIMEOUT 1
...
...
@@ -2104,7 +2105,11 @@ extern int server_id_check;
extern
int
persist_eui64
;
#endif
#ifdef DHCPv6
extern
int
prefix_length_mode
;
extern
int
do_release_on_roam
;
#endif
extern
int
authoring_byte_order
;
extern
int
lease_id_format
;
extern
u_int32_t
abandon_lease_time
;
...
...
server/dhcpd.c
View file @
bafa7b74
...
...
@@ -80,7 +80,11 @@ u_int16_t ddns_conflict_mask;
int
ddns_update_style
;
int
dont_use_fsync
=
0
;
/* 0 = default, use fsync, 1 = don't use fsync */
int
server_id_check
=
0
;
/* 0 = default, don't check server id, 1 = do check */
#ifdef DHCPv6
int
prefix_length_mode
=
PLM_PREFER
;
int
do_release_on_roam
=
0
;
/* 0 = default, do not release v6 leases on roam */
#endif
#ifdef EUI_64
int
persist_eui64
=
1
;
/* 1 = write EUI64 leases to disk, 0 = don't */
...
...
@@ -1365,6 +1369,7 @@ void postconf_initialization (int quiet)
server_id_check
=
1
;
}
#ifdef DHCPv6
oc
=
lookup_option
(
&
server_universe
,
options
,
SV_PREFIX_LEN_MODE
);
if
((
oc
!=
NULL
)
&&
evaluate_option_cache
(
&
db
,
NULL
,
NULL
,
NULL
,
options
,
NULL
,
...
...
@@ -1377,6 +1382,7 @@ void postconf_initialization (int quiet)
data_string_forget
(
&
db
,
MDL
);
}
#endif
// Set global abandon-lease-time option.
oc
=
lookup_option
(
&
server_universe
,
options
,
SV_ABANDON_LEASE_TIME
);
...
...
@@ -1416,6 +1422,16 @@ void postconf_initialization (int quiet)
}
#endif
#ifdef DHCPv6
oc
=
lookup_option
(
&
server_universe
,
options
,
SV_RELEASE_ON_ROAM
);
if
(
oc
!=
NULL
)
{
do_release_on_roam
=
evaluate_boolean_option_cache
(
NULL
,
NULL
,
NULL
,
NULL
,
options
,
NULL
,
&
global_scope
,
oc
,
MDL
);
}
#endif
#if defined (BINARY_LEASES)
if
(
local_family
==
AF_INET
)
{
log_info
(
"Source compiled to use binary-leases"
);
...
...
server/dhcpd.conf.5
View file @
bafa7b74
...
...
@@ -3116,6 +3116,27 @@ starting with pool A but with appropriately adjusted length criteria.
.RE
.PP
The
.I release-on-roam
statement
.RS 0.25i
.PP
.B release-on-roam \fIflag\fB;\fR
.PP
When enabled and the dhcpd server detects that a DHCPv6 client (IAID+DUID)
has roamed to a new network, it will release the pre-existing leases on the
old network and emit a log statement similiar to the following:
"Client: <id> roamed to new network, releasing lease: <address>"
The server will carry out all of the same steps that would normally occur
when a client explicitly releases a lease. When release-on-roam is disabled
(the default) the server makes such leases unavailable until they expire or
the server is restarted. Clients that need leases in multiple networks must
supply a unique IAID in each IA. This parameter may only be specified at
the global level.
.RE
.PP
The
.I remote-port
statement
.RS 0.25i
...
...
server/dhcpv6.c
View file @
bafa7b74
...
...
@@ -8400,7 +8400,8 @@ release_on_roam(struct reply_state* reply) {
struct
iasubopt
*
lease
=
NULL
;
int
i
;
if
(
old_ia
==
NULL
||
old_ia
->
num_iasubopt
<=
0
)
{
if
((
!
do_release_on_roam
)
||
old_ia
==
NULL
||
old_ia
->
num_iasubopt
<=
0
)
{
return
(
0
);
}
...
...
server/stables.c
View file @
bafa7b74
...
...
@@ -287,6 +287,7 @@ static struct option server_options[] = {
{
"ddns-dual-stack-mixed-mode"
,
"f"
,
&
server_universe
,
SV_DDNS_DUAL_STACK_MIXED_MODE
,
1
},
{
"ddns-guard-id-must-match"
,
"f"
,
&
server_universe
,
SV_DDNS_GUARD_ID_MUST_MATCH
,
1
},
{
"ddns-other-guard-is-dynamic"
,
"f"
,
&
server_universe
,
SV_DDNS_OTHER_GUARD_IS_DYNAMIC
,
1
},
{
"release-on-roam"
,
"f"
,
&
server_universe
,
SV_RELEASE_ON_ROAM
,
1
},
{
NULL
,
NULL
,
NULL
,
0
,
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