summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates-cfg/nat/rule/node.tag/inbound-interface/node.def7
-rw-r--r--templates-cfg/nat/rule/node.tag/outbound-interface/node.def7
2 files changed, 10 insertions, 4 deletions
diff --git a/templates-cfg/nat/rule/node.tag/inbound-interface/node.def b/templates-cfg/nat/rule/node.tag/inbound-interface/node.def
index 69913d6..43c2998 100644
--- a/templates-cfg/nat/rule/node.tag/inbound-interface/node.def
+++ b/templates-cfg/nat/rule/node.tag/inbound-interface/node.def
@@ -2,11 +2,14 @@ type: txt
help: Inbound interface of NAT traffic
-enumeration: existing-interfaces
+enumeration: existing-interfaces; echo "any"
-val_help: <interface> ; Interface name
+val_help: <interface> ; Interface name or "any"
commit:expression: exec "
+ if [ \"any\" == \"$VAR(@)\" ] ; then
+ exit 0
+ fi
intf_array=($(awk '$1 ~ /:/ { print $1 }' /proc/net/dev))
intf_array_len=${#intf_array[*]}
i=0
diff --git a/templates-cfg/nat/rule/node.tag/outbound-interface/node.def b/templates-cfg/nat/rule/node.tag/outbound-interface/node.def
index 28e42e8..fa432cf 100644
--- a/templates-cfg/nat/rule/node.tag/outbound-interface/node.def
+++ b/templates-cfg/nat/rule/node.tag/outbound-interface/node.def
@@ -2,11 +2,14 @@ type: txt
help: Outbound interface for NAT traffic
-enumeration: existing-interfaces
+enumeration: existing-interfaces; echo "any"
-val_help: <interface> ; Interface name
+val_help: <interface> ; Interface name or "any"
commit:expression: exec "
+ if [ \"any\" == \"$VAR(@)\" ] ; then
+ exit 0
+ fi
intf_array=($(awk '$1 ~ /:/ { print $1 }' /proc/net/dev))
intf_array_len=${#intf_array[*]}
i=0