mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 06:15:55 +00:00
Minor code fixes
[ISC-Bugs #19566] When trying to find the zone for a name for ddns allow the name to be at the apex of the zone. [ISC-Bugs #19617] Restrict length of interface name read from command line in dhcpd - based on a patch from David Cantrell at Red Hat. [ISC-Bugs #20039] Correct some error messages in dhcpd.c [ISC-Bugs #20070] Better range check on values when creating a DHCID. [ISC-Bugs #20198] Avoid writing past the end of the field when adding overly long file or server names to a packet and add a log message if the configuration supplied overly long names for these fields. [ISC-Bugs #21497] Add a little more randomness to rng seed in client
This commit is contained in:
@@ -404,6 +404,10 @@ main(int argc, char **argv) {
|
||||
} else {
|
||||
struct interface_info *tmp =
|
||||
(struct interface_info *)0;
|
||||
if (strlen(argv[i]) >= sizeof(tmp->name))
|
||||
log_fatal("%s: interface name too long "
|
||||
"(is %ld)",
|
||||
argv[i], (long)strlen(argv[i]));
|
||||
result = interface_allocate (&tmp, MDL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
log_fatal ("Insufficient memory to %s %s: %s",
|
||||
@@ -1014,7 +1018,7 @@ void postconf_initialization (int quiet)
|
||||
if (db.len == 4) {
|
||||
memcpy (&limited_broadcast, db.data, 4);
|
||||
} else
|
||||
log_fatal ("invalid remote port data length");
|
||||
log_fatal ("invalid broadcast address data length");
|
||||
data_string_forget (&db, MDL);
|
||||
}
|
||||
|
||||
@@ -1028,7 +1032,7 @@ void postconf_initialization (int quiet)
|
||||
if (db.len == 4) {
|
||||
memcpy (&local_address, db.data, 4);
|
||||
} else
|
||||
log_fatal ("invalid remote port data length");
|
||||
log_fatal ("invalid local address data length");
|
||||
data_string_forget (&db, MDL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user