summaryrefslogtreecommitdiffstats
path: root/src/lib/connections/tunnel
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/connections/tunnel')
-rw-r--r--src/lib/connections/tunnel7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/connections/tunnel b/src/lib/connections/tunnel
index a14f96e..ab62cc7 100644
--- a/src/lib/connections/tunnel
+++ b/src/lib/connections/tunnel
@@ -8,13 +8,10 @@ tunnel_up() {
if is_interface "$Interface"; then
report_error "Interface '$Interface' already exists"
return 1
- else
- ip tunnel add "$Interface" mode "$Mode" remote "$Remote"
fi
- if [[ -n "$Local" ]]; then
- ip tunnel change "$Interface" local "$Local"
- fi
+ ip tunnel add "$Interface" mode "$Mode" remote "$Remote" \
+ ${Local+local "$Local"}
bring_interface_up "$Interface"
ip_set