summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsusheela <susheela.vaidya@vyatta.com>2012-10-06 15:05:05 -0700
committersusheela <susheela.vaidya@vyatta.com>2012-10-06 15:05:05 -0700
commit57eecc07585ae93d9cf2f0a21a3e3c048a91e680 (patch)
tree5ad3091230e64f725256414fb129db745490fb72
parent58e6ba67237e7f730cccae4344517aadfea0a616 (diff)
downloadvyatta-cfg-firewall-57eecc07585ae93d9cf2f0a21a3e3c048a91e680.tar.gz
vyatta-cfg-firewall-57eecc07585ae93d9cf2f0a21a3e3c048a91e680.zip
PBR: config command validations, help strings etc. cleaned up and
includes fixes for 8355, 8362, 8365.
-rwxr-xr-xlib/Vyatta/IpTables/Rule.pm2
-rw-r--r--templates/firewall/ipv6-name/node.tag/rule/node.tag/source/mac-address/node.def2
-rw-r--r--templates/firewall/name/node.tag/rule/node.tag/source/mac-address/node.def2
-rw-r--r--templates/policy/ipv6-route/node.tag/rule/node.tag/set/mark/node.def1
-rw-r--r--templates/policy/ipv6-route/node.tag/rule/node.tag/source/mac-address/node.def2
-rw-r--r--templates/policy/route/node.tag/rule/node.tag/set/mark/node.def1
-rw-r--r--templates/policy/route/node.tag/rule/node.tag/source/mac-address/node.def2
7 files changed, 11 insertions, 1 deletions
diff --git a/lib/Vyatta/IpTables/Rule.pm b/lib/Vyatta/IpTables/Rule.pm
index 51b5bea..3c266f6 100755
--- a/lib/Vyatta/IpTables/Rule.pm
+++ b/lib/Vyatta/IpTables/Rule.pm
@@ -634,7 +634,7 @@ first character capitalized eg. Mon,Thu,Sat For negation, add ! in front eg. !Mo
if ($count == 0) {
return ('Policy route requires "action drop" or "set" parameters be defined.');
} elsif ($count > 1) {
- return ('Cannot define more than "set" parameter per policy route');
+ return ('Can not define more than one "set" parameter per policy route');
}
} else {
return ("\"action\" must be defined in rule $rule_num", );
diff --git a/templates/firewall/ipv6-name/node.tag/rule/node.tag/source/mac-address/node.def b/templates/firewall/ipv6-name/node.tag/rule/node.tag/source/mac-address/node.def
index 5519871..6d6d53d 100644
--- a/templates/firewall/ipv6-name/node.tag/rule/node.tag/source/mac-address/node.def
+++ b/templates/firewall/ipv6-name/node.tag/rule/node.tag/source/mac-address/node.def
@@ -1,3 +1,5 @@
type: txt
help: Source MAC address
+val_help: <MAC address>; MAC address to match
+val_help: <!MAC address>; Match everything except the specified MAC address
syntax:expression: exec "/opt/vyatta/sbin/vyatta-validate-type macaddr_negate '$VAR(@)'" ; "invalid MAC address \"$VAR(@)\""
diff --git a/templates/firewall/name/node.tag/rule/node.tag/source/mac-address/node.def b/templates/firewall/name/node.tag/rule/node.tag/source/mac-address/node.def
index 5519871..6d6d53d 100644
--- a/templates/firewall/name/node.tag/rule/node.tag/source/mac-address/node.def
+++ b/templates/firewall/name/node.tag/rule/node.tag/source/mac-address/node.def
@@ -1,3 +1,5 @@
type: txt
help: Source MAC address
+val_help: <MAC address>; MAC address to match
+val_help: <!MAC address>; Match everything except the specified MAC address
syntax:expression: exec "/opt/vyatta/sbin/vyatta-validate-type macaddr_negate '$VAR(@)'" ; "invalid MAC address \"$VAR(@)\""
diff --git a/templates/policy/ipv6-route/node.tag/rule/node.tag/set/mark/node.def b/templates/policy/ipv6-route/node.tag/rule/node.tag/set/mark/node.def
index c8cb1b2..8dd9f09 100644
--- a/templates/policy/ipv6-route/node.tag/rule/node.tag/set/mark/node.def
+++ b/templates/policy/ipv6-route/node.tag/rule/node.tag/set/mark/node.def
@@ -1,3 +1,4 @@
type: u32
help: Packet marking
+val_help: u32:1-2147483647; Packet marking
syntax:expression: $VAR(@) > 0 && $VAR(@) <= 2147483647; "packet mark must be between 0 and 2,147,483,647"
diff --git a/templates/policy/ipv6-route/node.tag/rule/node.tag/source/mac-address/node.def b/templates/policy/ipv6-route/node.tag/rule/node.tag/source/mac-address/node.def
index 5519871..6d6d53d 100644
--- a/templates/policy/ipv6-route/node.tag/rule/node.tag/source/mac-address/node.def
+++ b/templates/policy/ipv6-route/node.tag/rule/node.tag/source/mac-address/node.def
@@ -1,3 +1,5 @@
type: txt
help: Source MAC address
+val_help: <MAC address>; MAC address to match
+val_help: <!MAC address>; Match everything except the specified MAC address
syntax:expression: exec "/opt/vyatta/sbin/vyatta-validate-type macaddr_negate '$VAR(@)'" ; "invalid MAC address \"$VAR(@)\""
diff --git a/templates/policy/route/node.tag/rule/node.tag/set/mark/node.def b/templates/policy/route/node.tag/rule/node.tag/set/mark/node.def
index c8cb1b2..37bdfbc 100644
--- a/templates/policy/route/node.tag/rule/node.tag/set/mark/node.def
+++ b/templates/policy/route/node.tag/rule/node.tag/set/mark/node.def
@@ -1,3 +1,4 @@
type: u32
help: Packet marking
+val_help: u32:1-2147483647; Packet marking
syntax:expression: $VAR(@) > 0 && $VAR(@) <= 2147483647; "packet mark must be between 0 and 2,147,483,647"
diff --git a/templates/policy/route/node.tag/rule/node.tag/source/mac-address/node.def b/templates/policy/route/node.tag/rule/node.tag/source/mac-address/node.def
index 5519871..6d6d53d 100644
--- a/templates/policy/route/node.tag/rule/node.tag/source/mac-address/node.def
+++ b/templates/policy/route/node.tag/rule/node.tag/source/mac-address/node.def
@@ -1,3 +1,5 @@
type: txt
help: Source MAC address
+val_help: <MAC address>; MAC address to match
+val_help: <!MAC address>; Match everything except the specified MAC address
syntax:expression: exec "/opt/vyatta/sbin/vyatta-validate-type macaddr_negate '$VAR(@)'" ; "invalid MAC address \"$VAR(@)\""