summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <khagen@multi-development.com>2015-02-02 08:01:00 +0100
committerDaniil Baturin <daniil@baturin.org>2017-09-14 13:50:33 +0200
commit508ef2c225fd62a2a823489a0c112a14fae38117 (patch)
tree47aa3bdb6da7f9f2dd4632c07cc959b161cbd3c3
parentd2331b4734904d45e60876ed0e625b98d825986f (diff)
downloadvyatta-cfg-system-508ef2c225fd62a2a823489a0c112a14fae38117.tar.gz
vyatta-cfg-system-508ef2c225fd62a2a823489a0c112a14fae38117.zip
Bug #467, tos inherit not turned on by default on tunnels (IPIP, GRE)
-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