Interfaces: Diagnostics: Ping - add optional interval (seconds), closes https://github.com/opnsense/core/issues/9695

This commit is contained in:
Ad Schellevis 2026-02-01 11:25:45 +01:00
parent d31faf7f7c
commit c6540bf6fa
3 changed files with 14 additions and 0 deletions

View file

@ -31,6 +31,13 @@
Can be helpful to determine the maximum size a transport is able to send.
</help>
</field>
<field>
<id>ping.settings.interval</id>
<label>Interval (seconds)</label>
<type>text</type>
<hint>1</hint>
<help>Specify the number of seconds to wait between sending pings.</help>
</field>
<field>
<id>ping.settings.description</id>
<label>Description</label>

View file

@ -25,6 +25,10 @@
<MaximumValue>65535</MaximumValue>
</packetsize>
<disable_frag type="BooleanField"/>
<interval type="IntegerField">
<MinimumValue>1</MinimumValue>
<MaximumValue>120</MaximumValue>
</interval>
<description type="DescriptionField"/>
</settings>
</items>

View file

@ -172,6 +172,9 @@ if __name__ == '__main__':
args.append(settings['packetsize'])
if settings.get('disable_frag', '0') == '1':
args.append('-D')
if settings.get('interval', '') != '':
args.append('-i')
args.append(settings['interval'])
args.append(settings.get('hostname', ''))
if os.path.isfile(log_target):
os.remove(log_target)