mirror of
https://github.com/opnsense/core.git
synced 2026-02-03 20:39:42 -05:00
Interfaces: Diagnostics: Ping - add optional interval (seconds), closes https://github.com/opnsense/core/issues/9695
This commit is contained in:
parent
d31faf7f7c
commit
c6540bf6fa
3 changed files with 14 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue