summaryrefslogtreecommitdiff
path: root/interface-templates/ip/ospf/authentication/md5
diff options
context:
space:
mode:
Diffstat (limited to 'interface-templates/ip/ospf/authentication/md5')
-rw-r--r--interface-templates/ip/ospf/authentication/md5/key-id/node.def16
-rw-r--r--interface-templates/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def9
-rw-r--r--interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def1
-rw-r--r--interface-templates/ip/ospf/authentication/md5/node.def5
4 files changed, 31 insertions, 0 deletions
diff --git a/interface-templates/ip/ospf/authentication/md5/key-id/node.def b/interface-templates/ip/ospf/authentication/md5/key-id/node.def
new file mode 100644
index 00000000..630bd3f0
--- /dev/null
+++ b/interface-templates/ip/ospf/authentication/md5/key-id/node.def
@@ -0,0 +1,16 @@
+tag:
+type: u32
+help: Set MD5 key id
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "ID must be between (1-255)"
+commit:expression: $VAR(md5-key/) != ""; "Must add the md5-key for key-id $VAR(@)"
+delete:touch /tmp/ospf-md5.$PPID
+
+end: if [ -f /tmp/ospf-md5.$PPID ]
+ then vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" \
+ -c "no ip ospf message-digest-key $VAR(@)"
+ rm /tmp/ospf-md5.$PPID \
+ else vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" \
+ -c "ip ospf message-digest-key $VAR(@) md5 $VAR(md5-key/@)"
+ fi
+comp_help: possible completions:
+ <1-255> Set the key id
diff --git a/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def
new file mode 100644
index 00000000..5efd3ef7
--- /dev/null
+++ b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def
@@ -0,0 +1,9 @@
+type: txt
+help: Set md5 key
+syntax:expression: exec " \
+ if [ `echo -n '$VAR(@)' | wc -c` -gt 16 ]; then \
+ echo MD5 key must be 16 characters or less ; \
+ exit 1 ; \
+ fi ; "
+comp_help: possible completions:
+ <text> MD5 Key (16 characters or less)
diff --git a/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def
new file mode 100644
index 00000000..d14a2583
--- /dev/null
+++ b/interface-templates/ip/ospf/authentication/md5/key-id/node.tag/node.def
@@ -0,0 +1 @@
+help: Set md5 key
diff --git a/interface-templates/ip/ospf/authentication/md5/node.def b/interface-templates/ip/ospf/authentication/md5/node.def
new file mode 100644
index 00000000..9389c838
--- /dev/null
+++ b/interface-templates/ip/ospf/authentication/md5/node.def
@@ -0,0 +1,5 @@
+help: Set MD5 key id
+update:vyatta-vtysh -c "configure terminal" -c "interface $IFNAME" \
+ -c "no ip ospf authentication" -c "ip ospf authentication message-digest"
+delete:vyatta-vtysh -c "configure terminal" -c "interface $IFNAME"
+ -c "no ip ospf authentication"