summaryrefslogtreecommitdiff
path: root/templates/interfaces/l2tpv3
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces/l2tpv3')
-rw-r--r--templates/interfaces/l2tpv3/node.def12
-rw-r--r--templates/interfaces/l2tpv3/node.tag/disable/node.def4
-rw-r--r--templates/interfaces/l2tpv3/node.tag/mtu/node.def4
3 files changed, 10 insertions, 10 deletions
diff --git a/templates/interfaces/l2tpv3/node.def b/templates/interfaces/l2tpv3/node.def
index 973256bf..6a1109b2 100644
--- a/templates/interfaces/l2tpv3/node.def
+++ b/templates/interfaces/l2tpv3/node.def
@@ -33,24 +33,24 @@ begin:
fi
create:
- ip l2tp add tunnel tunnel_id $VAR(./tunnel-id/@) \
+ sudo ip l2tp add tunnel tunnel_id $VAR(./tunnel-id/@) \
peer_tunnel_id $VAR(./peer-tunnel-id/@) \
udp_sport $VAR(./source-port/@) \
udp_dport $VAR(./destination-port/@) \
encap $VAR(./encapsulation/@) \
local $VAR(./local-ip/@) \
remote $VAR(./remote-ip/@)
- ip l2tp add session session_id $VAR(./session-id/@) \
+ sudo ip l2tp add session session_id $VAR(./session-id/@) \
tunnel_id $VAR(./tunnel-id/@) \
peer_session_id $VAR(./peer-session-id/@) \
name $VAR(@)
- ip link set $VAR(@) up
+ sudo ip link set $VAR(@) up
delete:
- ip link set $VAR(@) down
+ sudo ip link set $VAR(@) down
if [ -n "$VAR(./tunnel-id/@)" ] && [ -n "$VAR(./session-id/@)" ] ; then
- ip l2tp del session tunnel_id $VAR(./tunnel-id/@) session_id $VAR(./session-id/@)
+ sudo ip l2tp del session tunnel_id $VAR(./tunnel-id/@) session_id $VAR(./session-id/@)
fi
if [ -n "$VAR(./tunnel-id/@)" ] ; then
- ip l2tp del tunnel tunnel_id $VAR(./tunnel-id/@)
+ sudo ip l2tp del tunnel tunnel_id $VAR(./tunnel-id/@)
fi
diff --git a/templates/interfaces/l2tpv3/node.tag/disable/node.def b/templates/interfaces/l2tpv3/node.tag/disable/node.def
index 26199646..8c580c95 100644
--- a/templates/interfaces/l2tpv3/node.tag/disable/node.def
+++ b/templates/interfaces/l2tpv3/node.tag/disable/node.def
@@ -1,4 +1,4 @@
help: Disable interface
-update: ip link set $VAR(../@) down
+update: sudo ip link set $VAR(../@) down
-delete: ip link set $VAR(../@) up
+delete: sudo ip link set $VAR(../@) up
diff --git a/templates/interfaces/l2tpv3/node.tag/mtu/node.def b/templates/interfaces/l2tpv3/node.tag/mtu/node.def
index 2190d183..71d2a12f 100644
--- a/templates/interfaces/l2tpv3/node.tag/mtu/node.def
+++ b/templates/interfaces/l2tpv3/node.tag/mtu/node.def
@@ -6,9 +6,9 @@ val_help: u32:68-9000; Maximum Transmission Unit (MTU)
update:
if [ -d /sys/class/net/$VAR(../@) ] ; then
- ip link set $VAR(../@) mtu $VAR(@)
+ sudo ip link set $VAR(../@) mtu $VAR(@)
fi
delete:
if [ -d /sys/class/net/$VAR(../@) ] ; then
- ip link set $VAR(../@) mtu 1488
+ sudo ip link set $VAR(../@) mtu 1488
fi