opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.07k stars 700 forks source link

unbound: discard-timeout #7512

Open planetf1 opened 3 weeks ago

planetf1 commented 3 weeks ago

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

swhite2 commented 2 weeks ago

Small nitpick, but looks good!

swhite2 commented 2 weeks ago

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