From 2b4ab84dd72e504d0f2f3f9b3fd71165064eb62d Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 10 Aug 2013 14:58:21 +0200 Subject: [PATCH] make it possible to manage mtu of the tinc interface --- manifests/vpn_net.pp | 1 + templates/tinc-up.erb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/manifests/vpn_net.pp b/manifests/vpn_net.pp index 0c6ac51..98325a2 100644 --- a/manifests/vpn_net.pp +++ b/manifests/vpn_net.pp @@ -7,6 +7,7 @@ define tinc::vpn_net( $tinc_internal_interface = 'eth1', $tinc_internal_ip = 'absent', $tinc_bridge_interface = 'absent', + $override_mtu = false, $port = '655', $compression = '10', $manage_shorewall = false, diff --git a/templates/tinc-up.erb b/templates/tinc-up.erb index 63ca2f9..b54542a 100644 --- a/templates/tinc-up.erb +++ b/templates/tinc-up.erb @@ -12,3 +12,6 @@ fi ifconfig $INTERFACE 0.0.0.0 brctl addif <%= real_tinc_bridge_interface %> $INTERFACE ifconfig $INTERFACE up +<% if override_mtu -%> + ifconfig $INTERFACE mtu <%= override_mtu.to_i %> +<% end -%>