From bdc9858374b41b9d622dcea386a4b4bb82becbe0 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 1 Feb 2008 18:02:38 -0800 Subject: fix for bug 2590: "protocols" -> "protocol" --- scripts/VyattaNatRule.pm | 4 ++-- templates-cfg/service/nat/rule/node.tag/protocol/node.def | 9 +++++++++ templates-cfg/service/nat/rule/node.tag/protocols/node.def | 9 --------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 templates-cfg/service/nat/rule/node.tag/protocol/node.def delete mode 100644 templates-cfg/service/nat/rule/node.tag/protocols/node.def diff --git a/scripts/VyattaNatRule.pm b/scripts/VyattaNatRule.pm index c2f2c34..1daa336 100644 --- a/scripts/VyattaNatRule.pm +++ b/scripts/VyattaNatRule.pm @@ -78,7 +78,7 @@ sub setup { $self->{_orig_type} = $config->returnOrigValue("type"); $self->{_inbound_if} = $config->returnValue("inbound-interface"); $self->{_outbound_if} = $config->returnValue("outbound-interface"); - $self->{_proto} = $config->returnValue("protocols"); + $self->{_proto} = $config->returnValue("protocol"); $self->{_exclude} = $config->exists("exclude"); $self->{_source}->{_addr} = $config->returnValue("source address"); @@ -142,7 +142,7 @@ sub setupOrig { $self->{_orig_type} = $config->returnOrigValue("type"); $self->{_inbound_if} = $config->returnOrigValue("inbound-interface"); $self->{_outbound_if} = $config->returnOrigValue("outbound-interface"); - $self->{_proto} = $config->returnOrigValue("protocols"); + $self->{_proto} = $config->returnOrigValue("protocol"); $self->{_exclude} = $config->existsOrig("exclude"); $self->{_source}->{_addr} = $config->returnOrigValue("source address"); diff --git a/templates-cfg/service/nat/rule/node.tag/protocol/node.def b/templates-cfg/service/nat/rule/node.tag/protocol/node.def new file mode 100644 index 0000000..bea3fa3 --- /dev/null +++ b/templates-cfg/service/nat/rule/node.tag/protocol/node.def @@ -0,0 +1,9 @@ +type: txt +help: 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: + An IP protocol name from /etc/protocols (e.g. "tcp" or "udp"). + <0-255> An IP protocol number. + all All IP protocols. + ! All IP protocols except for the specified name or number + (negation). diff --git a/templates-cfg/service/nat/rule/node.tag/protocols/node.def b/templates-cfg/service/nat/rule/node.tag/protocols/node.def deleted file mode 100644 index bea3fa3..0000000 --- a/templates-cfg/service/nat/rule/node.tag/protocols/node.def +++ /dev/null @@ -1,9 +0,0 @@ -type: txt -help: 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: - An IP protocol name from /etc/protocols (e.g. "tcp" or "udp"). - <0-255> An IP protocol number. - all All IP protocols. - ! All IP protocols except for the specified name or number - (negation). -- cgit v1.2.3