dig_with_opts @10.53.0.3 +yaml +ednsopt=UPDATE-LEASE:00000e10 +qr a.example >dig.out.test$n 2>&1 || ret=1
$PYTHON yamlget.py dig.out.test$n 0 message query_message_data OPT_PSEUDOSECTION EDNS UPDATE-LEASE LEASE >yamlget.out.test$n 2>&1 || ret=1
read -r value <yamlget.out.test$n
- [ "$value" = "3600 (1 hour)" ] || ret=1
+ [ "$value" = "3600" ] || ret=1
+ grep "LEASE: 3600 # 1 hour" dig.out.test$n >/dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
fi
dig_with_opts @10.53.0.3 +yaml +ednsopt=UPDATE-LEASE:00000e1000127500 +qr a.example >dig.out.test$n 2>&1 || ret=1
$PYTHON yamlget.py dig.out.test$n 0 message query_message_data OPT_PSEUDOSECTION EDNS UPDATE-LEASE LEASE >yamlget.out.test$n 2>&1 || ret=1
read -r value <yamlget.out.test$n
- [ "$value" = "3600 (1 hour)" ] || ret=1
+ [ "$value" = "3600" ] || ret=1
+ grep "LEASE: 3600 # 1 hour" dig.out.test$n >/dev/null || ret=1
$PYTHON yamlget.py dig.out.test$n 0 message query_message_data OPT_PSEUDOSECTION EDNS UPDATE-LEASE KEY-LEASE >yamlget.out.test$n 2>&1 || ret=1
read -r value <yamlget.out.test$n
- [ "$value" = "1209600 (2 weeks)" ] || ret=1
+ [ "$value" = "1209600" ] || ret=1
+ grep "KEY-LEASE: 1209600 # 2 weeks" dig.out.test$n >/dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
fi
snprintf(buf, sizeof(buf), " %u", secs);
ADD_STRING(target, buf);
- ADD_STRING(target, " (");
+ ADD_STRING(target, " # ");
result = dns_ttl_totext(secs, true,
true, target);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
- ADD_STRING(target, ")");
+ ADD_STRING(target, "\n");
if (optlen == 8U) {
key = isc_buffer_getuint32(
&optbuf);
- ADD_STRING(target, "\n");
INDENT(style);
ADD_STRING(target,
"KEY-LEASE:");
" %u", key);
ADD_STRING(target, buf);
- ADD_STRING(target, " (");
+ ADD_STRING(target, " # ");
result = dns_ttl_totext(
key, true, true,
target);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
- ADD_STRING(target, ")");
+ ADD_STRING(target, "\n");
}
- ADD_STRING(target, "\n");
continue;
}
break;
secs = isc_buffer_getuint32(&optbuf);
snprintf(buf, sizeof(buf), " %u", secs);
ADD_STRING(target, buf);
- ADD_STRING(target, " (");
+ ADD_STRING(target, " # ");
result = dns_ttl_totext(secs, true,
true, target);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
- ADD_STRING(target, ")\n");
+ ADD_STRING(target, "\n");
continue;
}
break;