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

Added local-address6

This commit is contained in:
Francis Dupont
2017-12-19 21:02:51 +01:00
parent f1208e796d
commit a2a0f98c21
7 changed files with 92 additions and 1 deletions

View File

@@ -1150,6 +1150,29 @@ void postconf_initialization (int quiet)
data_string_forget(&db, MDL);
path_dhcpd_pid = s;
}
oc = lookup_option(&server_universe, options,
SV_LOCAL_ADDRESS6);
if (oc &&
evaluate_option_cache(&db, NULL, NULL, NULL, options, NULL,
&global_scope, oc, MDL)) {
if (db.len == 16) {
memcpy(&local_address6, db.data, 16);
} else
log_fatal("invalid local address "
"data length");
data_string_forget(&db, MDL);
}
oc = lookup_option(&server_universe, options,
SV_BIND_LOCAL_ADDRESS6);
if (oc &&
evaluate_boolean_option_cache(NULL, NULL, NULL,
NULL, options, NULL,
&global_scope, oc, MDL)) {
bind_local_address6 = 1;
}
}
#endif /* DHCPv6 */