summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2021-10-17 18:47:01 +0700
committerGitHub <noreply@github.com>2021-10-17 18:47:01 +0700
commitb96636bded2c839ad6c3103887473a0deeda6a5c (patch)
treed5e1b9a3f84282ff5d89dd70e9027e839a039876
parent76fdbc6cbe039d3971c5e6afed08a93e6d1c124f (diff)
parent03742d1dafcce401f62e1047de5b95c6cf7de056 (diff)
downloadvyatta-cfg-system-b96636bded2c839ad6c3103887473a0deeda6a5c.tar.gz
vyatta-cfg-system-b96636bded2c839ad6c3103887473a0deeda6a5c.zip
Merge pull request #166 from sever-sever/T3786-crux
tunnel: T3786: Add checks for source any and not key
-rw-r--r--templates/interfaces/tunnel/node.def4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def
index d42f6560..48659c34 100644
--- a/templates/interfaces/tunnel/node.def
+++ b/templates/interfaces/tunnel/node.def
@@ -16,6 +16,10 @@ commit:expression:
exec "
if [ $VAR(./encapsulation/@) = gre ] && [ ! -n \"$VAR(./remote-ip/)\" ]; then \
echo \"No remote-ip configured for $VAR(@), tunnel can only be used for mGRE.\"; \
+ if [ $VAR(./local-ip/@) == \"0.0.0.0\" ] && [ ! -n \"$VAR(./parameters/ip/key/)\" ]; then \
+ echo \"Tunnel $VAR(@) parameters ip key must be set!\"; \
+ exit 1; \
+ fi \
fi; \
if [ -n \"$VAR(./6rd-prefix/)\" ]; then \
if [ $VAR(./encapsulation/@) != sit ]; then \