diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-08-05 12:24:11 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-08-05 12:24:11 -0700 |
commit | 4d56db8428fd770c86d80f77511814e2aff37c5e (patch) | |
tree | fba0883a86032086a448e757fada846dd5ce4808 /templates-cfg/service/nat/rule | |
parent | 1dfc6aa94e31a5ee6c420d184ec83dfd463bf615 (diff) | |
download | vyatta-nat-4d56db8428fd770c86d80f77511814e2aff37c5e.tar.gz vyatta-nat-4d56db8428fd770c86d80f77511814e2aff37c5e.zip |
* Fix Bug 1445 - Allow setting protocols tcp and udp in one rule
NAT rules can be defined with 'tcp_udp' as a valid value for protocol
* Fix Bug 4780 - DNAT rule to translate port fails
Diffstat (limited to 'templates-cfg/service/nat/rule')
-rw-r--r-- | templates-cfg/service/nat/rule/node.tag/protocol/node.def | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates-cfg/service/nat/rule/node.tag/protocol/node.def b/templates-cfg/service/nat/rule/node.tag/protocol/node.def index fdd589a..0aff708 100644 --- a/templates-cfg/service/nat/rule/node.tag/protocol/node.def +++ b/templates-cfg/service/nat/rule/node.tag/protocol/node.def @@ -1,8 +1,13 @@ type: txt help: Set protocol to NAT (this can be a protocol name in /etc/protocols, a protocol number, or "all") -syntax:expression: exec "/opt/vyatta/sbin/vyatta-validate-type.pl protocol_negate '$VAR(@)'" ; "invalid protocol \"$VAR(@)\"" comp_help:Possible completions: <text> An IP protocol name from /etc/protocols (e.g. "tcp" or "udp") <0-255> An IP protocol number + tcp_udp Both TCP and UDP all All IP protocols !<protocol> All IP protocols except for the specified name or number (negation) +syntax:expression: exec "if [ -n \"`/opt/vyatta/sbin/vyatta-validate-type.pl protocol_negate '$VAR(@)'`\" ] \ + && [ \"$VAR(@)\" != 'tcp_udp' ]; then \ + echo invalid protocol \"$VAR(@)\" ; \ + exit 1 ; \ + fi ; " |