2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 18:07:25 +00:00

Server no longer complains about NULL pointer when configured

server-identifier expression fails to evaluate. [ISC-Bugs #24547]
This commit is contained in:
Tomek Mrugalski 2011-05-23 10:34:10 +00:00
parent 802fdea172
commit 1b601efa2c
2 changed files with 13 additions and 7 deletions

View File

@ -159,6 +159,9 @@ work on other platforms. Please report any problems and suggested fixes to
- Documentation cleanup - Documentation cleanup
[ISC-Bugs #23326] Updated References document, several man page updates [ISC-Bugs #23326] Updated References document, several man page updates
- Server no longer complains about NULL pointer when configured
server-identifier expression fails to evaluate. [ISC-Bugs #24547]
Changes since 4.2.0 Changes since 4.2.0
- Documentation cleanup covering multiple tickets - Documentation cleanup covering multiple tickets

View File

@ -4395,15 +4395,18 @@ get_server_source_address(struct in_addr *from,
option_num = DHO_DHCP_SERVER_IDENTIFIER; option_num = DHO_DHCP_SERVER_IDENTIFIER;
oc = lookup_option(&dhcp_universe, options, option_num); oc = lookup_option(&dhcp_universe, options, option_num);
if ((oc != NULL) && if (oc != NULL) {
evaluate_option_cache(&d, packet, NULL, NULL, packet->options, if (evaluate_option_cache(&d, packet, NULL, NULL,
options, &global_scope, oc, MDL)) { packet->options, options,
if (d.len == sizeof(*from)) { &global_scope, oc, MDL)) {
memcpy(from, d.data, sizeof(*from)); if (d.len == sizeof(*from)) {
memcpy(from, d.data, sizeof(*from));
data_string_forget(&d, MDL);
return;
}
data_string_forget(&d, MDL); data_string_forget(&d, MDL);
return;
} }
data_string_forget(&d, MDL); oc = NULL;
} }
if (packet->interface->address_count > 0) { if (packet->interface->address_count > 0) {