diff options
Diffstat (limited to 'templates-cfg/nat')
-rw-r--r-- | templates-cfg/nat/destination/rule/node.tag/protocol/node.def | 7 | ||||
-rw-r--r-- | templates-cfg/nat/source/rule/node.tag/protocol/node.def | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/templates-cfg/nat/destination/rule/node.tag/protocol/node.def b/templates-cfg/nat/destination/rule/node.tag/protocol/node.def index 882581d..2655306 100644 --- a/templates-cfg/nat/destination/rule/node.tag/protocol/node.def +++ b/templates-cfg/nat/destination/rule/node.tag/protocol/node.def @@ -13,3 +13,10 @@ syntax:expression: exec "if [ -n \"`/opt/vyatta/sbin/vyatta-validate-type.pl pro echo invalid protocol \"$VAR(@)\" ; \ exit 1 ; \ fi ; " + +# Provide some help for command completion. Doesn't return negated +# values or protocol numbers +allowed: + protos=`cat /etc/protocols | sed -e '/^#.*/d' | awk '{ print $1 }' | grep -v 'v6'` + protos="all $protos tcp_udp" + echo -n $protos diff --git a/templates-cfg/nat/source/rule/node.tag/protocol/node.def b/templates-cfg/nat/source/rule/node.tag/protocol/node.def index 882581d..2655306 100644 --- a/templates-cfg/nat/source/rule/node.tag/protocol/node.def +++ b/templates-cfg/nat/source/rule/node.tag/protocol/node.def @@ -13,3 +13,10 @@ syntax:expression: exec "if [ -n \"`/opt/vyatta/sbin/vyatta-validate-type.pl pro echo invalid protocol \"$VAR(@)\" ; \ exit 1 ; \ fi ; " + +# Provide some help for command completion. Doesn't return negated +# values or protocol numbers +allowed: + protos=`cat /etc/protocols | sed -e '/^#.*/d' | awk '{ print $1 }' | grep -v 'v6'` + protos="all $protos tcp_udp" + echo -n $protos |