opnsense / core

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

PPPoE set idle timeout not working when INT value is 0. #7465

Open DMNight6 opened 4 months ago

DMNight6 commented 4 months ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug Unable to save PPPoE config after idle timeout is 0.

Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Interfaces'
  2. Click on 'WAN'
  3. Make sure WAN is PPPoE mode
  4. Scroll down to 'Idle timeout' and set a value that is 0
  5. Save
  6. Error "The field Idle timeout value is required." is seen

Expected behavior

Save and do other things :>

Environment

OPNsense 24.1.7 (amd64). Intel® Xeon™ E5-2673v3 @2.4GHz Network Intel® 82576 Quad Port Network Intel® X520-DA1

AdSchellevis commented 4 months ago

help text should probably be changed, if you choose Dial on demand a timeout is required, otherwise leaving it empty or 0 omits the value from the configuration.

https://github.com/opnsense/core/blob/af3d45c1e18434e712f8f3a1f07cc4ee1425bb06/src/www/interfaces.php#L686-L694

https://github.com/opnsense/core/blob/af3d45c1e18434e712f8f3a1f07cc4ee1425bb06/src/www/interfaces.php#L2423-L2432

DMNight6 commented 4 months ago

So I suppose to set a timeout for Dial On Demand? @AdSchellevis

AdSchellevis commented 4 months ago

it looks like it, yes, but this has been in here for ages, I don't think a lot of people actually use dial on demand with PPPoE. looking briefly at the code, dropping the constraint doesn't hurt either likely (although it seems a but silly to need a connection which is not always open, but when it starts, should never close).