dns_rdataset_t *ps = NULL;
const dns_name_t *name = NULL;
isc_result_t result = ISC_R_SUCCESS;
- char buf[sizeof("1234567890")];
+ char buf[sizeof("/1234567890")];
uint32_t mbz;
dns_rdata_t rdata;
isc_buffer_t optbuf;
ADD_STRING(target, "\n");
continue;
}
+ } else if (optcode == DNS_OPT_UL) {
+ INDENT(style);
+ ADD_STRING(target, "UL:");
+ if (optlen == 4U || optlen == 8U) {
+ uint32_t secs, key = 0;
+ secs = isc_buffer_getuint32(&optbuf);
+ snprintf(buf, sizeof(buf), " %u", secs);
+ ADD_STRING(target, buf);
+ if (optlen == 8U) {
+ key = isc_buffer_getuint32(
+ &optbuf);
+ snprintf(buf, sizeof(buf),
+ "/%u", key);
+ ADD_STRING(target, buf);
+ }
+ ADD_STRING(target, " (");
+ result = dns_ttl_totext(secs, true,
+ true, target);
+ if (result != ISC_R_SUCCESS) {
+ goto cleanup;
+ }
+ if (optlen == 8U) {
+ ADD_STRING(target, "/");
+ result = dns_ttl_totext(
+ key, true, true,
+ target);
+ if (result != ISC_R_SUCCESS) {
+ goto cleanup;
+ }
+ }
+ ADD_STRING(target, ")\n");
+ continue;
+ }
} else if (optcode == DNS_OPT_NSID) {
INDENT(style);
ADD_STRING(target, "NSID:");
ADD_STRING(target, "\n");
continue;
}
+ } else if (optcode == DNS_OPT_UL) {
+ ADD_STRING(target, "; UL:");
+ if (optlen == 4U || optlen == 8U) {
+ uint32_t secs, key = 0;
+ secs = isc_buffer_getuint32(&optbuf);
+ snprintf(buf, sizeof(buf), " %u", secs);
+ ADD_STRING(target, buf);
+ if (optlen == 8U) {
+ key = isc_buffer_getuint32(
+ &optbuf);
+ snprintf(buf, sizeof(buf),
+ "/%u", key);
+ ADD_STRING(target, buf);
+ }
+ ADD_STRING(target, " (");
+ result = dns_ttl_totext(secs, true,
+ true, target);
+ if (result != ISC_R_SUCCESS) {
+ goto cleanup;
+ }
+ if (optlen == 8U) {
+ ADD_STRING(target, "/");
+ result = dns_ttl_totext(
+ key, true, true,
+ target);
+ if (result != ISC_R_SUCCESS) {
+ goto cleanup;
+ }
+ }
+ ADD_STRING(target, ")\n");
+ continue;
+ }
} else if (optcode == DNS_OPT_NSID) {
ADD_STRING(target, "; NSID:");
} else if (optcode == DNS_OPT_COOKIE) {