mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
security/tinc: merge version 1.3 from master
This commit is contained in:
parent
e61362ce67
commit
8a9997423c
5 changed files with 22 additions and 3 deletions
|
|
@ -1,6 +1,5 @@
|
|||
PLUGIN_NAME= tinc
|
||||
PLUGIN_VERSION= 1.2
|
||||
PLUGIN_REVISION= 2
|
||||
PLUGIN_VERSION= 1.3
|
||||
PLUGIN_COMMENT= Tinc VPN
|
||||
PLUGIN_DEPENDS= tinc
|
||||
PLUGIN_MAINTAINER= ad@opnsense.org
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@
|
|||
It is best to use only those ciphers which support CBC mode
|
||||
</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>network.PMTUDiscovery</id>
|
||||
<label>path MTU Discovery</label>
|
||||
<type>checkbox</type>
|
||||
<help>When this option is enabled, tinc will try to discover the path MTU to this node. After the path MTU has been discovered, it will be enforced on the VPN.</help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>network.debuglevel</id>
|
||||
<label>Debug</label>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<model>
|
||||
<mount>//OPNsense/Tinc</mount>
|
||||
<version>1.0.1</version>
|
||||
<version>1.0.2</version>
|
||||
<description>
|
||||
OPNsense Tinc VPN
|
||||
</description>
|
||||
|
|
@ -70,6 +70,10 @@
|
|||
<switch>switch</switch>
|
||||
</OptionValues>
|
||||
</mode>
|
||||
<PMTUDiscovery type="BooleanField">
|
||||
<default>1</default>
|
||||
<Required>Y</Required>
|
||||
</PMTUDiscovery>
|
||||
<enabled type="BooleanField">
|
||||
<default>1</default>
|
||||
<Required>Y</Required>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ class Network(NetwConfObject):
|
|||
self._payload['intaddress'] = None
|
||||
self._payload['debuglevel'] = 'd0'
|
||||
self._payload['mode'] = 'switch'
|
||||
self._payload['PMTUDiscovery'] = 'yes'
|
||||
self._hosts = list()
|
||||
|
||||
def get_id(self):
|
||||
|
|
@ -87,10 +88,17 @@ class Network(NetwConfObject):
|
|||
hostObj.set(host_prop.tag, host_prop)
|
||||
self._hosts.append(hostObj)
|
||||
|
||||
def set_PMTUDiscovery(self, value):
|
||||
if value.text != '1':
|
||||
self._payload['PMTUDiscovery'] = 'no'
|
||||
else:
|
||||
self._payload['PMTUDiscovery'] = 'yes'
|
||||
|
||||
def config_text(self):
|
||||
result = list()
|
||||
result.append('AddressFamily=any')
|
||||
result.append('Mode=%(mode)s' % self._payload)
|
||||
result.append('PMTUDiscovery=%(PMTUDiscovery)s' % self._payload)
|
||||
result.append('Port=%(port)s' % self._payload)
|
||||
result.append('PingTimeout=%(pingtimeout)s' % self._payload)
|
||||
for host in self._hosts:
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<network>
|
||||
<id>{{network.id}}</id>
|
||||
<mode>{{network.mode}}</mode>
|
||||
<PMTUDiscovery>{{network.PMTUDiscovery}}</PMTUDiscovery>
|
||||
<hostname>{{network.hostname}}</hostname>
|
||||
<network>{{network.name}}</network>
|
||||
<intaddress>{{network.intaddress}}</intaddress>
|
||||
|
|
|
|||
Loading…
Reference in a new issue