[srp] always send Update Lease (UL) option in success response (#13148)

Per RFC 9664, the UL option is always included in a success response (RCODE=0).
Comment in test_srp_server is updated also to avoid suggesting the opposite.
This commit is contained in:
Esko Dijk
2026-05-26 07:37:39 -07:00
committed by GitHub
parent 4de7bc578e
commit cf7e5bb2b3
2 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -727,8 +727,9 @@ void Server::CommitSrpUpdate(Error aError,
exit:
if (aMessageInfo != nullptr)
{
if (aError == kErrorNone && (grantedLease != hostLease || grantedKeyLease != hostKeyLease))
if (aError == kErrorNone)
{
// RFC 9664: server MUST echo the Update Lease option in any successful (RCODE=0) response.
SendResponse(aDnsHeader, grantedLease, grantedKeyLease, useShortLease, *aMessageInfo);
}
else