Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unbound: discard-timeout #7512

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

planetf1
Copy link

@planetf1 planetf1 commented Jun 5, 2024

Adds support for 'discard-timeout' to Unbound configuration.

This can be useful when using the option to serve expired responses.

The new option is added just below 'Jostle Timeout' within the advanced panel.
I did consider adding it within the serve-expired section, however it's not strictly as tightly related and has more general applicability (as per unbound docs). I also removed once sentence (for help) which made no sense from the unbound docs, and clarified the exact labels used for related settings in the UI.

I tested with a 'live' install to ensure the panel worked, and the value was then placed into /var/unbound/advanced.conf

Based off master

Fixes #7493

Signed-off-by: Nigel Jones <[email protected]>
from accumulating.
If 'Serve Expired Responses' is enabled it should be set greater than 'Client Expired Response Timeout'.
Otherwise, a value of 1900 msec is suggested.
The value 0 disables it. Default 1900 msec.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"0" could be problematic which may be indistinguishable from "" (the empty default), but I leave that for @swhite2 to check

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know serve-expired-ttl (which we use) has a similar use of 0 as per the unbound doc

I just checked - and if I leave the value blank in the opnsense UI, no value is written to the configuration for discard-timeout. Once I set a value, it is written. Finally, if I specifically put 0 there, that does get written.

So I think in all cases it matches the unbound docs ?

@swhite2
Copy link
Member

swhite2 commented Jun 6, 2024

Small nitpick, but looks good!

@swhite2
Copy link
Member

swhite2 commented Jun 6, 2024

Oh, one more thing: in the ticket you said

The help should guide the user to make this value higher than the client expired response timeout and warn that otherwise these late responses will not update the cache

Perhaps this can be included in the help text as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Unbound: allow discard-timeout to be configured
3 participants