diff --git a/security/tinc/Makefile b/security/tinc/Makefile
index 0f0879f02..0c4a40ed6 100644
--- a/security/tinc/Makefile
+++ b/security/tinc/Makefile
@@ -1,6 +1,5 @@
PLUGIN_NAME= tinc
-PLUGIN_VERSION= 1.1
-PLUGIN_REVISION= 1
+PLUGIN_VERSION= 1.2
PLUGIN_COMMENT= Tinc VPN
PLUGIN_DEPENDS= tinc
PLUGIN_MAINTAINER= ad@opnsense.org
diff --git a/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/forms/dialogNetwork.xml b/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/forms/dialogNetwork.xml
index 5b9dfb05a..8f1e81f20 100644
--- a/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/forms/dialogNetwork.xml
+++ b/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/forms/dialogNetwork.xml
@@ -5,6 +5,13 @@
checkbox
Enable this network
+
+ network.mode
+
+ dropdown
+ true
+ This option selects the way packets are routed to other daemons
+
network.name
diff --git a/security/tinc/src/opnsense/mvc/app/models/OPNsense/Tinc/Tinc.xml b/security/tinc/src/opnsense/mvc/app/models/OPNsense/Tinc/Tinc.xml
index 466f37b62..b54455a8a 100644
--- a/security/tinc/src/opnsense/mvc/app/models/OPNsense/Tinc/Tinc.xml
+++ b/security/tinc/src/opnsense/mvc/app/models/OPNsense/Tinc/Tinc.xml
@@ -1,6 +1,6 @@
//OPNsense/Tinc
- 1.0.0
+ 1.0.1
OPNsense Tinc VPN
@@ -62,6 +62,14 @@
/tmp/tinc_current_cipher_options.index
aes-256-cbc
+
+ Y
+ router
+
+ router
+ switch
+
+
1
Y
diff --git a/security/tinc/src/opnsense/scripts/OPNsense/Tinc/lib/objects.py b/security/tinc/src/opnsense/scripts/OPNsense/Tinc/lib/objects.py
index 55c6e34d6..9c52cc875 100644
--- a/security/tinc/src/opnsense/scripts/OPNsense/Tinc/lib/objects.py
+++ b/security/tinc/src/opnsense/scripts/OPNsense/Tinc/lib/objects.py
@@ -62,6 +62,7 @@ class Network(NetwConfObject):
self._payload['privkey'] = None
self._payload['intaddress'] = None
self._payload['debuglevel'] = 'd0'
+ self._payload['mode'] = 'switch'
self._hosts = list()
def get_id(self):
@@ -86,6 +87,7 @@ class Network(NetwConfObject):
def config_text(self):
result = list()
result.append('AddressFamily=any')
+ result.append('Mode=%(mode)s' % self._payload)
result.append('Port=%(port)s' % self._payload)
result.append('PingTimeout=%(pingtimeout)s' % self._payload)
for host in self._hosts:
diff --git a/security/tinc/src/opnsense/service/templates/OPNsense/Tinc/tinc_deploy.xml b/security/tinc/src/opnsense/service/templates/OPNsense/Tinc/tinc_deploy.xml
index 0d7687207..440afed75 100644
--- a/security/tinc/src/opnsense/service/templates/OPNsense/Tinc/tinc_deploy.xml
+++ b/security/tinc/src/opnsense/service/templates/OPNsense/Tinc/tinc_deploy.xml
@@ -4,6 +4,7 @@
{% if network.enabled|default('0') == '1' %}
{{network.id}}
+ {{network.mode}}
{{network.hostname}}
{{network.name}}
{{network.intaddress}}