summaryrefslogtreecommitdiff
path: root/templates/interfaces/tunnel
diff options
context:
space:
mode:
authorKim Hagen <khagen@multi-development.com>2015-02-02 08:01:00 +0100
committerKim Hagen <khagen@multi-development.com>2015-02-02 08:01:00 +0100
commit6ab6520391b685319f8a644aa70a03ae5902309c (patch)
tree0605c3b0bb86b3e7c776110c828af2fb36fcae9a /templates/interfaces/tunnel
parent670cefe56026f35a8d57f506c07af18974a6bf66 (diff)
downloadvyatta-cfg-system-6ab6520391b685319f8a644aa70a03ae5902309c.tar.gz
vyatta-cfg-system-6ab6520391b685319f8a644aa70a03ae5902309c.zip
Bug #467, tos inherit not turned on by default on tunnels (IPIP, GRE)
Diffstat (limited to 'templates/interfaces/tunnel')
-rw-r--r--templates/interfaces/tunnel/node.def7
1 files changed, 5 insertions, 2 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def
index f7ffd746..795168f6 100644
--- a/templates/interfaces/tunnel/node.def
+++ b/templates/interfaces/tunnel/node.def
@@ -40,6 +40,9 @@ create:
echo "interfaces tunnel $VAR(@): Tunnel encapsulation type must be gre-bridge if a bridge group is defined";
exit 1;
fi
+ if [ -z "$VAR(./parameters/ip/tos/@)" ]; then
+ TOS="tos inherit"
+ fi
if [ -z "$VAR(./parameters/ip/ttl/@)" ]; then
TTL="ttl 255"
fi
@@ -47,9 +50,9 @@ create:
KEY="key $VAR(./parameters/ip/key/@)";
fi
if [ "$VAR(./encapsulation/@)" == "gre" ] && [ -z $VAR(./remote-ip/) ]; then
- ip tunnel add $VAR(@) local $VAR(./local-ip/@) mode gre $KEY $TTL
+ ip tunnel add $VAR(@) local $VAR(./local-ip/@) mode gre $KEY $TTL $TOS
else
- ip tunnel add $VAR(@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@) $KEY $TTL
+ ip tunnel add $VAR(@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@) $KEY $TTL $TOS
fi
if [ -z "`ip tun sh | grep $VAR(@)`" ]; then
echo interfaces tunnel $VAR(@): error creating tunnel interface