Commit 0b89f1d0 authored by Ad Schellevis's avatar Ad Schellevis

IDS, add advanced feature default-packet-size, closes https://github.com/opnsense/core/issues/1622

parent fae2e48f
...@@ -37,6 +37,13 @@ ...@@ -37,6 +37,13 @@
<help><![CDATA[Select interface(s) to use. When enabling IPS, only use physical interfaces here (no vlans etc).]]></help> <help><![CDATA[Select interface(s) to use. When enabling IPS, only use physical interfaces here (no vlans etc).]]></help>
<hint>Type or select interface.</hint> <hint>Type or select interface.</hint>
</field> </field>
<field>
<id>ids.general.defaultPacketSize</id>
<label>default packet size</label>
<type>text</type>
<advanced>true</advanced>
<help><![CDATA[With this option, you can set the size of the packets on your network. It is possible that bigger packets have to be processed sometimes. The engine can still process these bigger packets, but processing it will lower the performance.]]></help>
</field>
<field> <field>
<id>ids.general.AlertLogrotate</id> <id>ids.general.AlertLogrotate</id>
<label>Rotate log</label> <label>Rotate log</label>
......
...@@ -118,6 +118,12 @@ ...@@ -118,6 +118,12 @@
<enable>/^(?!0).*$/</enable> <enable>/^(?!0).*$/</enable>
</filters> </filters>
</interfaces> </interfaces>
<defaultPacketSize type="IntegerField">
<Required>N</Required>
<MinimumValue>82</MinimumValue>
<MaximumValue>65535</MaximumValue>
<ValidationMessage>Enter a valid packet size</ValidationMessage>
</defaultPacketSize>
<UpdateCron type="ModelRelationField"> <UpdateCron type="ModelRelationField">
<Model> <Model>
<queues> <queues>
......
...@@ -58,7 +58,9 @@ host-mode: auto ...@@ -58,7 +58,9 @@ host-mode: auto
# Preallocated size for packet. Default is 1514 which is the classical # Preallocated size for packet. Default is 1514 which is the classical
# size for pcap on ethernet. You should adjust this value to the highest # size for pcap on ethernet. You should adjust this value to the highest
# packet size (MTU + hardware header) on your system. # packet size (MTU + hardware header) on your system.
#default-packet-size: 1514 {% if helpers.exists('OPNsense.IDS.general.defaultPacketSize') %}
default-packet-size: {{OPNsense.IDS.general.defaultPacketSize|default('1514')}}
{% endif %}
# The default logging directory. Any log or output file will be # The default logging directory. Any log or output file will be
# placed here if its not specified with a full path name. This can be # placed here if its not specified with a full path name. This can be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment