summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSaurabh Mohan <saurabh.mohan@vyatta.com>2012-08-09 14:12:59 -0700
committerSaurabh Mohan <saurabh.mohan@vyatta.com>2012-08-09 14:12:59 -0700
commit7062598f4803afd3516626991fbe44cee6b99861 (patch)
tree7ac9a72f40b5325c656a5dff7f938069a9b0b9db /templates
parentfea8fcbdc0b75e4f5382959eb216d0c5dfcd8ebe (diff)
downloadvyatta-cfg-system-7062598f4803afd3516626991fbe44cee6b99861.tar.gz
vyatta-cfg-system-7062598f4803afd3516626991fbe44cee6b99861.zip
Bugfix 8241: VTI Sync up the mtu range check with what the kernel module accepts.
Allow VTI mtu range check to be inline with what the kernel will accept. Also add a warning if a VTI is configured but not used. Improve the interface name range which is allowed (8259)
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/vti/node.def8
-rw-r--r--templates/interfaces/vti/node.tag/mtu/node.def4
2 files changed, 9 insertions, 3 deletions
diff --git a/templates/interfaces/vti/node.def b/templates/interfaces/vti/node.def
index 9a5120a6..15ea2e3e 100644
--- a/templates/interfaces/vti/node.def
+++ b/templates/interfaces/vti/node.def
@@ -4,7 +4,7 @@ type: txt
help: Virtual Tunnel interface
val_help: <vtiN>; Virtual Tunnel interface name
syntax:expression: pattern $VAR(@) "^vti[0-9]+$" \
- ; "vti must be (vti-vti999)"
+ ; "vti must be (vti0-vti999..)"
begin:
if [ "${COMMIT_ACTION}" == DELETE ]; then
@@ -15,6 +15,12 @@ if [ "${COMMIT_ACTION}" == DELETE ]; then
exit -1
fi
fi
+if [ "${COMMIT_ACTION}" == SET ]; then
+ `${vyatta_sbindir}/vyatta-vti-config.pl --checkref --intf=$VAR(@)`
+ if [ $? -eq 0 ]; then
+ echo "Warning: Interface $VAR(@) is not referenced in vpn configuration."
+ fi
+fi
delete:
if [ -d /sys/class/net/$VAR(@) ] ; then
diff --git a/templates/interfaces/vti/node.tag/mtu/node.def b/templates/interfaces/vti/node.tag/mtu/node.def
index 3a3ef8f1..0ac0ed2f 100644
--- a/templates/interfaces/vti/node.tag/mtu/node.def
+++ b/templates/interfaces/vti/node.tag/mtu/node.def
@@ -1,8 +1,8 @@
type: u32
priority: 382
help: Maximum Transmission Unit (MTU)
-syntax:expression: $VAR(@) >= 64 && $VAR(@) <= 8024; "Must be between 64-8024"
-val_help: u32:64-8024; Maximum Transmission Unit (MTU)
+syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "Must be between 68-9000"
+val_help: u32:68-9000; Maximum Transmission Unit (MTU)
update:
if [ -d /sys/class/net/$VAR(../@) ] ; then