36#include <dns/result.h>
43#if defined (DEBUG_DNS_UPDATES)
44static char* dump_ddns_cb_func(
void *func);
50static void ddns_fwd_srv_connector(
struct lease *
lease,
54 isc_result_t eresult);
56static void copy_conflict_flags(u_int16_t *target, u_int16_t source);
58static void ddns_fwd_srv_add3(
dhcp_ddns_cb_t *ddns_cb, isc_result_t eresult);
83static void data_string_append (
struct data_string *ds1,
86 memcpy (ds1 ->
buffer -> data + ds1 -> len,
89 ds1 -> len += ds2 -> len;
112 int server_updates_a = 1;
114 int ignorep = 0, client_ignorep = 0;
133 if ((old != NULL) && (old->
ddns_cb != NULL)) {
137 }
else if (lease6 != NULL) {
138 if ((old6 != NULL) && (old6->
ddns_cb != NULL)) {
151 if (ddns_cb == NULL) {
171 }
else if (lease6 != NULL) {
172 scope = &(lease6->
scope);
184 memset (&d1, 0,
sizeof(d1));
185 memset (&ddns_hostname, 0,
sizeof (ddns_hostname));
186 memset (&ddns_domainname, 0,
sizeof (ddns_domainname));
187 memset (&old_ddns_fwd_name, 0,
sizeof (ddns_fwd_name));
188 memset (&ddns_fwd_name, 0,
sizeof (ddns_fwd_name));
189 memset (&ddns_dhcid, 0,
sizeof (ddns_dhcid));
205 options, scope, oc,
MDL))
216 options, scope, oc,
MDL))
219 server_updates_a = 0;
230 options, scope, oc,
MDL)) {
243 options, scope, oc,
MDL))
254 options, scope, oc,
MDL);
266 options, scope, oc,
MDL)) {
270 MDL) && ddns_hostname.len > 0));
278 options, scope, oc,
MDL);
283 if (ddns_hostname.len + ddns_domainname.len > 253) {
284 log_error (
"ddns_update: host.domain name too long");
291 ddns_domainname.len + 2,
MDL)) {
292 ddns_fwd_name.data = ddns_fwd_name.buffer->data;
293 data_string_append (&ddns_fwd_name, &ddns_hostname);
294 ddns_fwd_name.buffer->data[ddns_fwd_name.len] =
'.';
296 data_string_append (&ddns_fwd_name, &ddns_domainname);
297 ddns_fwd_name.buffer->data[ddns_fwd_name.len] =
'\0';
298 ddns_fwd_name.terminated = 1;
306 if (old_ddns_fwd_name.len != ddns_fwd_name.len ||
307 memcmp (old_ddns_fwd_name.data, ddns_fwd_name.data,
308 old_ddns_fwd_name.len)) {
317#if defined (DDNS_UPDATE_SLOW_TRANSITION)
341 options, scope, oc,
MDL)) {
350 "ddns-client-fqdn")) {
353 if (old_ddns_fwd_name.len == ddns_fwd_name.len &&
354 !memcmp (old_ddns_fwd_name.data, ddns_fwd_name.data,
355 old_ddns_fwd_name.len) &&
360 options, scope, oc,
MDL))) {
369 if ((!ddns_fwd_name.len) || (ddns_fwd_name.len > 255)) {
370 if (ddns_fwd_name.len > 255) {
371 log_error (
"client provided fqdn: too long");
375 if (do_remove != 0) {
405#ifndef USE_OLD_DDNS_TTL
406 else if (lease6 != NULL) {
407 ddns_ttl = lease6->
prefer/2;
419 if (d1.len == sizeof (u_int32_t))
425 ddns_cb->
ttl = ddns_ttl;
445 rev_name_len = snprintf(buf,
sizeof(buf),
"%u.%u.%u.%u.",
452 rev_name_len += d1.len;
454 if (rev_name_len > 255) {
455 log_error(
"ddns_update: Calculated rev domain "
466 rev_name_len =
sizeof(
"0.1.2.3.4.5.6.7."
491 rev_name_len,
MDL)) {
508 data_string_append(rname, &d1);
513 for (i=0; i<16; i++) {
515 (*a & 0xF), ((*a >> 4) & 0xF));
519 strcat(p,
"ip6.arpa.");
520 rname->
len = strlen((
const char *)rname->
data);
567 if (lease6 != NULL) {
573 }
else if ((
lease != NULL) &&
591 }
else if (
lease != NULL)
624 ddns_fwd_srv_connector(
lease, lease6, scope, ddns_cb,
650 }
else if (client_ignorep &&
717 memcpy(&bp->
data[5], d1.data, d1.len);
719 bp, &bp->
data[5], d1.len,
734 bp ->
data [0] = server_updates_a;
736 bp, &bp->
data [0], 1,
739 bp ->
data [1] = server_updates_a;
741 bp, &bp->
data [1], 1,
748 options, scope, oc,
MDL))
753 bp, &bp->
data [2], 1,
756 bp ->
data [3] = 255;
758 bp, &bp->
data [3], 1,
761 bp ->
data [4] = 255;
763 bp, &bp->
data [4], 1,
766 if (ddns_fwd_name.len) {
767 memcpy (&bp ->
data [5],
768 ddns_fwd_name.data, ddns_fwd_name.len);
782 if (ddns_cb != NULL) {
783 destroy_ddns_cb(ddns_cb,
MDL);
830 struct in6_addr addr;
848 if (inscope != NULL) {
860 if (iasubopt_hash_lookup(&lease6,
pool->leases,
862 scope = &(lease6->
scope);
879 return(ISC_R_FAILURE);
883 switch(ddns_cb->
state) {
885 unset(*scope,
"ddns-rev-name");
887 unset(*scope,
"ddns-client-fqdn");
910 memset(&lease_dhcid, 0,
sizeof(lease_dhcid));
920 unset(*scope,
"ddns-fwd-name");
964 sprintf(reason,
"unknown");
965 sprintf(lease_address,
"unknown");
972 if (ddns_cb != NULL) {
977 sprintf(reason,
"duplicate IPv4 fixed-address entry");
979 sprintf(reason,
"duplicate IPv6 fixed-address6 entry "
980 "or overlapping pools");
986 sprintf(reason,
"corrupted ddns_cb structure (address "
991 log_error(
"Failed to properly update internal lease structure with "
993 log_error(
"control block structures. Tried to update lease for"
994 "%s address, ddns_cb=%p.", lease_address, ddns_cb);
997 log_error(
"This condition can occur, if DHCP server configuration is "
999 log_error(
"In particular, please do check that your configuration:");
1000 log_error(
"a) does not have overlapping pools (especially containing");
1001 log_error(
" %s address).", lease_address);
1002 log_error(
"b) there are no duplicate fixed-address or fixed-address6");
1003 log_error(
"entries for the %s address.", lease_address);
1005 log_error(
"Possible reason for this failure: %s", reason);
1007 log_fatal(
"%s(%d): Failed to update lease database with DDNS info for "
1008 "address %s. Lease database inconsistent. Unable to recover."
1009 " Terminating.",
file,
line, lease_address);
1025 if (
lease == NULL) {
1027 log_fatal(
"Impossible condition at %s:%d (called from %s:%d).",
1043 log_error(
"%s(%d): Invalid lease update. Tried to "
1044 "clear already NULL DDNS control block "
1045 "pointer for lease %s.",
1048#if defined (DNS_UPDATES_MEMORY_CHECKS)
1064 log_error(
"%s(%d): Failed to update internal lease "
1065 "structure with DDNS control block. Existing"
1066 " ddns_cb structure does not match "
1067 "expectations.IPv4=%s, old ddns_cb=%p, tried"
1068 "to update to new ddns_cb=%p",
file,
line,
1071#if defined (DNS_UPDATES_MEMORY_CHECKS)
1088safe_lease6_update(
struct iasubopt *lease6,
1095 if (lease6 == NULL) {
1097 log_fatal(
"Impossible condition at %s:%d (called from %s:%d).",
1101 if ( (lease6->
ddns_cb == NULL) && (newcb == NULL) ) {
1102 inet_ntop(AF_INET6, &lease6->
addr, addrbuf,
1108 log_error(
"%s(%d): Failed to update internal lease "
1109 "structure. Tried to clear already NULL "
1110 "DDNS control block pointer for lease %s.",
1113#if defined (DNS_UPDATES_MEMORY_CHECKS)
1114 update_lease_failed(NULL, lease6, oldcb, newcb,
file,
line);
1130 inet_ntop(AF_INET6, &lease6->
addr, addrbuf,
1133 log_error(
"%s(%d): Failed to update internal lease "
1134 "structure with DDNS control block. Existing"
1135 " ddns_cb structure does not match "
1136 "expectations.IPv6=%s, old ddns_cb=%p, tried"
1137 "to update to new ddns_cb=%p",
file,
line,
1138 addrbuf, oldcb, newcb);
1140#if defined (DNS_UPDATES_MEMORY_CHECKS)
1141 update_lease_failed(NULL, lease6, oldcb, newcb,
file,
line);
1178 sprintf(ddns_address,
"unknown");
1179 if (ddns_cb == NULL) {
1180 log_info(
"%s(%d): No control block for lease update",
1182 return (ISC_R_FAILURE);
1187#if defined (DEBUG_DNS_UPDATES)
1188 log_info(
"%s(%d): Updating lease_ptr for ddns_cp=%p (addr=%s)",
1189 file,
line, ddns_cb, ddns_address );
1197#if defined (DEBUG_DNS_UPDATES)
1198 log_info(
"lease is static, returning");
1212 if (
lease != NULL) {
1213 safe_lease_update(
lease, ddns_cb, ddns_cb_set,
1215 }
else if (lease6 != NULL) {
1216 safe_lease6_update(lease6, ddns_cb, ddns_cb_set,
1222#if defined (DEBUG_DNS_UPDATES)
1223 log_info(
"%s(%d): find_lease_by_ip_addr(%s) successful:"
1224 "lease=%p",
file,
line, ddns_address,
1233 log_error(
"%s(%d): ddns_update_lease_ptr failed. "
1234 "Lease for %s not found.",
1237#if defined (DNS_UPDATES_MEMORY_CHECKS)
1238 update_lease_failed(NULL, NULL,
ddns_cb, ddns_cb_set,
1245 return(ISC_R_FAILURE);
1249 struct iasubopt *find_lease6 = NULL;
1251 struct in6_addr addr;
1259 inet_ntop(AF_INET6, &addr, addrbuf,
1261 log_error(
"%s(%d): Pool for lease %s not found.",
1263#if defined (DNS_UPDATES_MEMORY_CHECKS)
1264 update_lease_failed(NULL, NULL, ddns_cb, ddns_cb_set,
1271 return(ISC_R_FAILURE);
1274 if (iasubopt_hash_lookup(&find_lease6,
pool->leases,
1276 find_lease6->
ddns_cb = ddns_cb_set;
1279 inet_ntop(AF_INET6, &addr, addrbuf,
1281 log_error(
"%s(%d): Lease %s not found within pool.",
1283#if defined (DNS_UPDATES_MEMORY_CHECKS)
1284 update_lease_failed(NULL, NULL, ddns_cb, ddns_cb_set,
1292 return(ISC_R_FAILURE);
1297 log_fatal(
"Impossible condition at %s:%d, called from %s:%d.",
1306 isc_result_t eresult)
1309 log_info(
"Added reverse map from %.*s to %.*s",
1315 ddns_update_lease_text(ddns_cb, NULL);
1317 log_error(
"Unable to add reverse map from %.*s to %.*s: %s",
1322 isc_result_totext (eresult));
1325 ddns_update_lease_ptr(NULL, NULL, ddns_cb, NULL,
MDL);
1326 destroy_ddns_cb(ddns_cb,
MDL);
1350 isc_result_t eresult)
1352 isc_result_t result = eresult;
1356 log_info(
"Removed reverse map on %.*s",
1361 case DNS_R_NXDOMAIN:
1365 ddns_update_lease_text(ddns_cb, NULL);
1369#if defined (DEBUG_DNS_UPDATES)
1370 log_info(
"DDNS: removed map or no reverse map to remove %.*s",
1377 log_error(
"Can't remove reverse map on %.*s: %s",
1380 isc_result_totext (eresult));
1388 result = ISC_R_FAILURE;
1390 ddns_update_lease_ptr(NULL, NULL, ddns_cb, NULL,
MDL);
1391 ddns_fwd_srv_connector(NULL, NULL, NULL, ddns_cb->
next_op, result);
1392 destroy_ddns_cb(ddns_cb,
MDL);
1431 isc_result_t eresult)
1433 isc_result_t result;
1434 const char *logstr = NULL;
1437#if defined (DEBUG_DNS_UPDATES)
1438 log_info (
"DDNS:ddns_fwd_srv_add2: %s eresult: %d",
1439 dump_ddns_cb(ddns_cb), eresult);
1447 log_info(
"Added new forward map from %.*s to %s",
1452 ddns_update_lease_text(ddns_cb, NULL);
1456 if (ddns_cb->
zone != NULL) {
1471 case DNS_R_YXDOMAIN:
1472 logstr =
"DHCID mismatch, belongs to another client.";
1475 case DNS_R_NXDOMAIN:
1480 ddns_cb->
cur_func = ddns_fwd_srv_add3;
1490 logstr =
"Has an address record but no DHCID, not mine.";
1494 logstr = isc_result_totext(eresult);
1498 if (logstr != NULL) {
1499 log_error(
"Forward map from %.*s to %s FAILED: %s",
1502 ddns_address, logstr);
1505 ddns_update_lease_ptr(NULL, NULL, ddns_cb, NULL,
MDL);
1506 destroy_ddns_cb(ddns_cb,
MDL);
1523 isc_result_t eresult)
1525 isc_result_t result;
1528#if defined (DEBUG_DNS_UPDATES)
1529 log_info (
"DDNS: ddns_fwd_srv_add1: %s eresult: %d",
1530 dump_ddns_cb(ddns_cb), eresult);
1538 log_info (
"Added new forward map from %.*s to %s",
1543 ddns_update_lease_text(ddns_cb, NULL);
1547 if (ddns_cb->
zone != NULL) {
1561 case DNS_R_YXDOMAIN:
1564 ddns_cb->
cur_func = ddns_fwd_srv_add2;
1572 log_error (
"Unable to add forward map from %.*s to %s: %s",
1576 isc_result_totext (eresult));
1580 ddns_update_lease_ptr(NULL, NULL, ddns_cb, NULL,
MDL);
1581 destroy_ddns_cb(ddns_cb,
MDL);
1603 isc_result_t eresult)
1605 isc_result_t result;
1606 const char *logstr = NULL;
1609#if defined (DEBUG_DNS_UPDATES)
1610 log_info (
"DDNS: ddns_fwd_srv_add3: %s eresult: %d",
1611 dump_ddns_cb(ddns_cb), eresult);
1615 memset(ddns_address, 0x0,
sizeof(ddns_address));
1617 sizeof(ddns_address) - 1);
1621 log_info(
"Added new forward map from %.*s to %s",
1626 ddns_update_lease_text(ddns_cb, NULL);
1630 if (ddns_cb->
zone != NULL) {
1645 logstr =
"an entry that is either static or "
1646 "owned by another client exists.";
1650 logstr =
"static entry of the other protocol type exists.";
1654 logstr = isc_result_totext(eresult);
1658 if (logstr != NULL) {
1659 log_error(
"Forward map from %.*s to %s FAILED: %s",
1662 ddns_address, logstr);
1665 ddns_update_lease_ptr(NULL, NULL, ddns_cb, NULL,
MDL);
1666 destroy_ddns_cb(ddns_cb,
MDL);
1686 isc_result_t eresult)
1688 isc_result_t result = ISC_R_FAILURE;
1690#if defined (DEBUG_DNS_UPDATES)
1691 log_info (
"DDNS: ddns_fwd_srv_connector: %s eresult: %d",
1692 dump_ddns_cb(ddns_cb), eresult);
1695 if (ddns_cb == NULL) {
1708 ddns_cb->
cur_func = ddns_fwd_srv_add1;
1716 ddns_update_lease_text(ddns_cb, inscope);
1722 ddns_update_lease_ptr(
lease, lease6, ddns_cb, ddns_cb,
MDL);
1724 destroy_ddns_cb(ddns_cb,
MDL);
1745 isc_result_t eresult)
1747#if defined (DEBUG_DNS_UPDATES)
1748 log_info (
"DDNS: ddns_fwd_srv_rem2: %s eresult: %d",
1749 dump_ddns_cb(ddns_cb), eresult);
1767 (eresult == DNS_R_YXRRSET)) {
1768 ddns_update_lease_text(ddns_cb, NULL);
1775 if (ddns_cb->
zone != NULL) {
1780 ddns_cb->
cur_func = ddns_ptr_remove;
1790 ddns_update_lease_ptr(NULL, NULL, ddns_cb, NULL,
MDL);
1791 ddns_fwd_srv_connector(NULL, NULL, NULL, ddns_cb->
next_op, eresult);
1792 destroy_ddns_cb(ddns_cb,
MDL);
1806 isc_result_t eresult)
1808 isc_result_t result = eresult;
1811#if defined (DEBUG_DNS_UPDATES)
1812 log_info (
"DDNS: ddns_fwd_srv_rem1: %s eresult: %d",
1813 dump_ddns_cb(ddns_cb), eresult);
1820 log_info(
"Removed forward map from %.*s to %s",
1827 ddns_cb->
cur_func = ddns_fwd_srv_rem2;
1835 case DNS_R_NXDOMAIN:
1844 #define DSMM_OGD (DDNS_DUAL_STACK_MIXED_MODE | \
1845 DDNS_OTHER_GUARD_IS_DYNAMIC)
1846 if ((ddns_cb->
flags & DSMM_OGD) == DSMM_OGD) {
1848 ddns_cb->
cur_func = ddns_fwd_srv_rem2;
1856 ddns_update_lease_text(ddns_cb, NULL);
1858#if defined (DEBUG_DNS_UPDATES)
1859 log_info(
"DDNS: no forward map to remove. %p", ddns_cb);
1877 if (ddns_cb->
zone != NULL) {
1882 ddns_cb->
cur_func = ddns_ptr_remove;
1894 ddns_update_lease_ptr(NULL, NULL, ddns_cb, NULL,
MDL);
1895 ddns_fwd_srv_connector(NULL, NULL, NULL, ddns_cb->
next_op, eresult);
1896 destroy_ddns_cb(ddns_cb,
MDL);
1929 isc_result_t rcode, execute_add = ISC_R_FAILURE;
1931 isc_result_t result = ISC_R_FAILURE;
1935#if defined (DEBUG_DNS_UPDATES)
1936 log_info (
"DDNS: ddns_removals: %s",
1937 dump_ddns_cb(add_ddns_cb));
1963 if (add_ddns_cb == NULL) {
1981 if (ddns_cb->
next_op != NULL) {
1985#if defined (DEBUG_DNS_UPDATES)
1986 log_info(
"DDNS %s(%d): removal already in "
1987 "progress new ddns_cb=%p",
1992 }
else if ((lease6 != NULL) && (lease6->
ddns_cb != NULL)) {
2009 if (ddns_cb->
next_op != NULL) {
2013#if defined (DEBUG_DNS_UPDATES)
2014 log_info(
"DDNS %s(%d): removal already in "
2015 "progress new ddns_cb=%p",
2026 if (ddns_cb == NULL) {
2038 if (
lease != NULL) {
2043 }
else if (lease6 != NULL) {
2044 scope = &(lease6->
scope);
2088 execute_add = ISC_R_FAILURE;
2092 "ddns-client-fqdn")) {
2103 memset(&leaseid, 0,
sizeof(leaseid));
2143 ddns_cb->
next_op = add_ddns_cb;
2156 ddns_cb->
cur_func = ddns_fwd_srv_rem1;
2160 ddns_update_lease_ptr(
lease, lease6, ddns_cb,
2169 execute_add = ISC_R_FAILURE;
2174 unset(*scope,
"ddns-fwd-name");
2181 ddns_cb->
cur_func = ddns_ptr_remove;
2191 ddns_fwd_srv_connector(
lease, lease6, scope,
2192 add_ddns_cb, execute_add);
2201 ddns_update_lease_ptr(
lease, lease6, ddns_cb, ddns_cb,
2208 execute_add = ISC_R_FAILURE;
2219 ddns_fwd_srv_connector(
lease, lease6, scope, add_ddns_cb, execute_add);
2220 if (ddns_cb != NULL)
2221 destroy_ddns_cb(ddns_cb,
MDL);
2227void set_flag (u_int16_t *flags,
2243void copy_conflict_flags(u_int16_t *target,
2261 int ddns_update_conflict_detection = 1;
2262 int ddns_dual_stack_mixed_mode = 0;
2263 int ddns_guard_id_must_match = 1;
2264 int ddns_other_guard_is_dynamic = 0;
2270 ddns_update_conflict_detection =
2276 ddns_update_conflict_detection);
2278 if (!ddns_update_conflict_detection) {
2279#if defined (DEBUG_DNS_UPDATES)
2280 log_info (
"DDNS conflict detection: off");
2293 ddns_dual_stack_mixed_mode =
2301 ddns_guard_id_must_match =
2309 ddns_other_guard_is_dynamic =
2316 ddns_dual_stack_mixed_mode);
2319 ddns_guard_id_must_match);
2322 ddns_other_guard_is_dynamic);
2324#if defined (DEBUG_DNS_UPDATES)
2325 log_info (
"DDNS conflict behavior:\n"
2326 "\tddns-update-style: %s\n"
2327 "\tupdate-conflict-detection: %d\n"
2328 "\tddns-dual-stack-mixed-mode: %d\n"
2329 "\tddns-guard-id-must-match %d\n"
2330 "\tddns-other-guard-is-dynamic: %d\n",
2332 ddns_update_conflict_detection,
2333 ddns_dual_stack_mixed_mode,
2334 ddns_guard_id_must_match,
2335 ddns_other_guard_is_dynamic);
2340#if defined (DEBUG_DNS_UPDATES)
2349dump_ddns_cb_func(
void *func) {
2350 static LabeledPtr funcs[] = {
2351 { ddns_ptr_add,
"ddns_ptr_add" },
2352 { ddns_fwd_srv_add2,
"ddns_fwd_srv_add2" },
2353 { ddns_fwd_srv_add1,
"ddns_fwd_srv_add1" },
2354 { ddns_ptr_remove,
"ddns_ptr_remove" },
2355 { ddns_fwd_srv_rem2,
"ddns_fwd_srv_rem2" },
2356 { ddns_fwd_srv_rem1,
"ddns_fwd_srv_rem1" },
2357 { ddns_fwd_srv_add3,
"ddns_fwd_srv_adde" },
2361 LabeledPtr* lp = funcs;
2366 while ((lp->ptr) && (lp->ptr != func)) {
2376 static char output_buf[4096];
2378 return (
"<ddns_cb is null>");
2381 sprintf (output_buf,
"ddns_cb: %p flags: %x state: %s cur_func: %s",
2382 ddns_cb, ddns_cb->
flags,
2384 dump_ddns_cb_func(ddns_cb->
cur_func));
int buffer_allocate(struct buffer **ptr, unsigned len, const char *file, int line)
void data_string_forget(struct data_string *data, const char *file, int line)
int data_string_new(struct data_string *new_string, const char *src, unsigned int len, const char *file, int line)
Constructs a null-terminated data_string from a char* and length.
void data_string_copy(struct data_string *dest, const struct data_string *src, const char *file, int line)
int buffer_dereference(struct buffer **ptr, const char *file, int line)
int save_option_buffer(struct universe *universe, struct option_state *options, struct buffer *bp, unsigned char *buffer, unsigned length, unsigned code, int terminatep)
struct option_cache * lookup_option(struct universe *universe, struct option_state *options, unsigned code)
u_int32_t getULong(const unsigned char *)
int write_lease(struct lease *lease)
#define FQDN_SERVER_UPDATE
#define DHO_DHCP_CLIENT_IDENTIFIER
#define FQDN_NO_CLIENT_UPDATE
#define SV_DDNS_DOMAIN_NAME
#define SV_UPDATE_STATIC_LEASES
#define DDNS_STATIC_LEASE
#define SV_DO_FORWARD_UPDATES
#define SV_DDNS_CONFLICT_DETECT
#define SV_DDNS_REV_DOMAIN_NAME
#define DDNS_EXECUTE_NEXT
#define DDNS_GUARD_ID_MUST_MATCH
#define SV_CLIENT_UPDATES
struct dhcp_ddns_cb dhcp_ddns_cb_t
void dhcid_tolease(struct data_string *, struct data_string *)
void ddns_cancel(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
#define DDNS_STATE_REM_FW_NXRR
#define DDNS_STATE_ADD_FW_YXDHCID
isc_result_t ddns_modify_fwd(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
#define DDNS_STATE_REM_PTR
#define MAX_DEFAULT_DDNS_TTL
u_int16_t get_conflict_mask(struct option_state *input_options)
#define DDNS_STATE_ADD_FW_NXDOMAIN
#define DDNS_STATE_ADD_PTR
int ddns_updates(struct packet *, struct lease *, struct lease *, struct iasubopt *, struct iasubopt *, struct option_state *)
isc_result_t dhcid_fromlease(struct data_string *, struct data_string *)
#define SV_DDNS_HOST_NAME
#define SV_DDNS_GUARD_ID_MUST_MATCH
#define MAX_ADDRESS_STRING_LEN
char * ddns_state_name(int state)
void ddns_cb_forget_zone(dhcp_ddns_cb_t *ddns_cb)
struct universe server_universe
isc_result_t ia_dereference(struct ia_xx **ia, const char *file, int line)
#define DDNS_STATE_DSMM_FW_ADD3
#define DDNS_ACTIVE_LEASE
#define DDNS_UPDATE_STYLE_INTERIM
#define SV_USE_HOST_DECL_NAMES
#define DDNS_STATE_REM_FW_YXDHCID
#define DDNS_UPDATE_STYLE_STANDARD
isc_result_t find_ipv6_pool(struct ipv6_pool **pool, u_int16_t type, const struct in6_addr *addr)
int find_lease_by_ip_addr(struct lease **, struct iaddr, const char *, int)
isc_result_t ipv6_pool_dereference(struct ipv6_pool **pool, const char *file, int line)
de-reference an IPv6 pool structure.
isc_result_t ddns_modify_ptr(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
int write_ia(const struct ia_xx *)
#define SV_DDNS_OTHER_GUARD_IS_DYNAMIC
#define DDNS_STATE_CLEANUP
isc_result_t iasubopt_dereference(struct iasubopt **iasubopt, const char *file, int line)
dhcp_ddns_cb_t * ddns_cb_alloc(const char *file, int line)
isc_result_t ddns_removals(struct lease *, struct iasubopt *, struct dhcp_ddns_cb *, isc_boolean_t)
#define SV_DDNS_DUAL_STACK_MIXED_MODE
#define DDNS_OTHER_GUARD_IS_DYNAMIC
int get_dhcid(dhcp_ddns_cb_t *, int, const u_int8_t *, unsigned)
#define SV_UPDATE_OPTIMIZATION
#define DDNS_CLIENT_DID_UPDATE
#define DDNS_CONFLICT_DETECTION
#define DDNS_STATE_REM_FW_DSMM_OTHER
int find_lease(struct lease **, struct packet *, struct shared_network *, int *, int *, struct lease *, const char *, int)
void ddns_cb_free(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
isc_result_t ia_reference(struct ia_xx **ia, struct ia_xx *src, const char *file, int line)
#define DDNS_DUAL_STACK_MIXED_MODE
u_int16_t ddns_conflict_mask
#define SV_DO_REVERSE_UPDATES
const char * piaddr(const struct iaddr addr)
int log_error(const char *,...) __attribute__((__format__(__printf__
void log_fatal(const char *,...) __attribute__((__format__(__printf__
int int log_info(const char *,...) __attribute__((__format__(__printf__
struct enumeration_value ddns_styles_values[]
const unsigned char * data
dns_rdataclass_t other_dhcid_class
struct data_string fwd_name
dns_rdataclass_t dhcid_class
struct data_string rev_name
struct dhcp_ddns_cb * next_op
u_int8_t hbuf[HARDWARE_ADDR_LEN+1]
struct data_string iaid_duid
struct dhcp_ddns_cb * ddns_cb
struct binding_scope * scope
struct dhcp_ddns_cb * ddns_cb
struct binding_scope * scope
struct hardware hardware_addr
struct option_state * options
struct universe fqdn_universe
int evaluate_option_cache(struct data_string *result, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct option_cache *oc, const char *file, int line)
int evaluate_boolean_option_cache(int *ignorep, struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, struct option_state *cfg_options, struct binding_scope **scope, struct option_cache *oc, const char *file, int line)
int bind_ds_value(struct binding_scope **scope, const char *name, struct data_string *value)
int unset(struct binding_scope *scope, const char *name)
struct binding_scope * global_scope
int find_bound_string(struct data_string *value, struct binding_scope *scope, const char *name)