mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 13:28:14 +00:00
[master] Patch to ignore UIDS
This patch adds an option to allow the administrator to tell the server to ignore UIDS when choosing a lease.
This commit is contained in:
parent
61ef216b8d
commit
38ee81bd80
10
RELNOTES
10
RELNOTES
@ -109,6 +109,7 @@ work on other platforms. Please report any problems and suggested fixes to
|
|||||||
man page for a description.
|
man page for a description.
|
||||||
[ISC-Bugs #19598]
|
[ISC-Bugs #19598]
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
- When doing DDNS if there isn't an appropriate zone statement attempt
|
- When doing DDNS if there isn't an appropriate zone statement attempt
|
||||||
to find a reasoanble nameserver via a DNS resolver. This restores
|
to find a reasoanble nameserver via a DNS resolver. This restores
|
||||||
some functionality that was lost in the transition to asynchronous
|
some functionality that was lost in the transition to asynchronous
|
||||||
@ -122,6 +123,15 @@ work on other platforms. Please report any problems and suggested fixes to
|
|||||||
"ddns-local-address4" and "ddns-local-address6" that each take
|
"ddns-local-address4" and "ddns-local-address6" that each take
|
||||||
one instance of their respective address types.
|
one instance of their respective address types.
|
||||||
[ISC-Bugs #34779]
|
[ISC-Bugs #34779]
|
||||||
|
=======
|
||||||
|
- Add ignore-client-uids option in the server. This option causes
|
||||||
|
the server to not record a client's uid in its lease. This
|
||||||
|
violates the specification but may also be useful when a client
|
||||||
|
can dual boot using different client ids but the same mac address.
|
||||||
|
Thank you to Brian De Wolf for the patch.
|
||||||
|
[ISC-Bugs #32427]
|
||||||
|
[ISC-Bugs #35066]
|
||||||
|
>>>>>>> rt35066
|
||||||
|
|
||||||
Changes since 4.2.5
|
Changes since 4.2.5
|
||||||
|
|
||||||
|
@ -735,6 +735,7 @@ struct lease_state {
|
|||||||
#define SV_DONT_USE_FSYNC 79
|
#define SV_DONT_USE_FSYNC 79
|
||||||
#define SV_DDNS_LOCAL_ADDRESS4 80
|
#define SV_DDNS_LOCAL_ADDRESS4 80
|
||||||
#define SV_DDNS_LOCAL_ADDRESS6 81
|
#define SV_DDNS_LOCAL_ADDRESS6 81
|
||||||
|
#define SV_IGNORE_CLIENT_UIDS 82
|
||||||
|
|
||||||
#if !defined (DEFAULT_PING_TIMEOUT)
|
#if !defined (DEFAULT_PING_TIMEOUT)
|
||||||
# define DEFAULT_PING_TIMEOUT 1
|
# define DEFAULT_PING_TIMEOUT 1
|
||||||
|
@ -2343,32 +2343,41 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
|
|||||||
/* Update Client Last Transaction Time. */
|
/* Update Client Last Transaction Time. */
|
||||||
lt->cltt = cur_time;
|
lt->cltt = cur_time;
|
||||||
|
|
||||||
|
/* See if we want to record the uid for this client */
|
||||||
|
oc = lookup_option(&server_universe, state->options,
|
||||||
|
SV_IGNORE_CLIENT_UIDS);
|
||||||
|
if ((oc == NULL) ||
|
||||||
|
!evaluate_boolean_option_cache(&ignorep, packet, lease, NULL,
|
||||||
|
packet->options, state->options,
|
||||||
|
&lease->scope, oc, MDL)) {
|
||||||
|
|
||||||
/* Record the uid, if given... */
|
/* Record the uid, if given... */
|
||||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
oc = lookup_option (&dhcp_universe, packet -> options,
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER);
|
DHO_DHCP_CLIENT_IDENTIFIER);
|
||||||
if (oc &&
|
if (oc &&
|
||||||
evaluate_option_cache (&d1, packet, lease,
|
evaluate_option_cache(&d1, packet, lease, NULL,
|
||||||
(struct client_state *)0,
|
packet->options, state->options,
|
||||||
packet -> options, state -> options,
|
&lease->scope, oc, MDL)) {
|
||||||
&lease -> scope, oc, MDL)) {
|
if (d1.len <= sizeof(lt->uid_buf)) {
|
||||||
if (d1.len <= sizeof lt -> uid_buf) {
|
memcpy(lt->uid_buf, d1.data, d1.len);
|
||||||
memcpy (lt -> uid_buf, d1.data, d1.len);
|
lt->uid = lt->uid_buf;
|
||||||
lt -> uid = lt -> uid_buf;
|
lt->uid_max = sizeof(lt->uid_buf);
|
||||||
lt -> uid_max = sizeof lt -> uid_buf;
|
lt->uid_len = d1.len;
|
||||||
lt -> uid_len = d1.len;
|
|
||||||
} else {
|
} else {
|
||||||
unsigned char *tuid;
|
unsigned char *tuid;
|
||||||
lt -> uid_max = d1.len;
|
lt->uid_max = d1.len;
|
||||||
lt -> uid_len = d1.len;
|
lt->uid_len = d1.len;
|
||||||
tuid = (unsigned char *)dmalloc (lt -> uid_max, MDL);
|
tuid = (unsigned char *)dmalloc(lt->uid_max,
|
||||||
|
MDL);
|
||||||
/* XXX inelegant */
|
/* XXX inelegant */
|
||||||
if (!tuid)
|
if (!tuid)
|
||||||
log_fatal ("no memory for large uid.");
|
log_fatal ("no memory for large uid.");
|
||||||
memcpy (tuid, d1.data, lt -> uid_len);
|
memcpy(tuid, d1.data, lt->uid_len);
|
||||||
lt -> uid = tuid;
|
lt->uid = tuid;
|
||||||
}
|
}
|
||||||
data_string_forget (&d1, MDL);
|
data_string_forget (&d1, MDL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (host) {
|
if (host) {
|
||||||
host_reference (< -> host, host, MDL);
|
host_reference (< -> host, host, MDL);
|
||||||
|
@ -2306,6 +2306,19 @@ relay closest to the server independent of number.
|
|||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
|
.I ignore-client-uids
|
||||||
|
statement
|
||||||
|
.RS 0.25i
|
||||||
|
.PP
|
||||||
|
.B ignore-client-uids \fIflag\fB;\fR
|
||||||
|
.PP
|
||||||
|
If the \fIignore-client-uids\fR statement is present and has a value of
|
||||||
|
\fItrue\fR or \fIon\fR, the UID for clients will not be recorded.
|
||||||
|
If this statement is not present or has a value of \fIfalse\fR or
|
||||||
|
\fIoff\fR, then client UIDs will be recorded.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
The
|
||||||
.I infinite-is-reserved
|
.I infinite-is-reserved
|
||||||
statement
|
statement
|
||||||
.RS 0.25i
|
.RS 0.25i
|
||||||
|
@ -268,10 +268,9 @@ static struct option server_options[] = {
|
|||||||
#endif /* LDAP_CONFIGURATION */
|
#endif /* LDAP_CONFIGURATION */
|
||||||
{ "dhcp-cache-threshold", "B", &server_universe, 78, 1 },
|
{ "dhcp-cache-threshold", "B", &server_universe, 78, 1 },
|
||||||
{ "dont-use-fsync", "f", &server_universe, 79, 1 },
|
{ "dont-use-fsync", "f", &server_universe, 79, 1 },
|
||||||
|
|
||||||
{ "ddns-local-address4", "I", &server_universe, 80, 1 },
|
{ "ddns-local-address4", "I", &server_universe, 80, 1 },
|
||||||
{ "ddns-local-address6", "6", &server_universe, 81, 1 },
|
{ "ddns-local-address6", "6", &server_universe, 81, 1 },
|
||||||
|
{ "ignore-client-uids", "f", &server_universe, 82, 1 },
|
||||||
{ NULL, NULL, NULL, 0, 0 }
|
{ NULL, NULL, NULL, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user