diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2008-12-09 15:57:41 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2008-12-09 15:57:41 -0800 |
commit | a1079991df0425d8338686053602c0c5fe1e62fb (patch) | |
tree | 755aa679099075d3ae0d8584da1aed49c7f9f5ba /templates/firewall/log-martians/node.def | |
parent | a8cd93d29719ad2aab005ebbf401df23ba5754c7 (diff) | |
download | vyatta-cfg-firewall-a1079991df0425d8338686053602c0c5fe1e62fb.tar.gz vyatta-cfg-firewall-a1079991df0425d8338686053602c0c5fe1e62fb.zip |
Cleanup firewall templates for readability. Update help strings to reflect IPv4.
Diffstat (limited to 'templates/firewall/log-martians/node.def')
-rw-r--r-- | templates/firewall/log-martians/node.def | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/templates/firewall/log-martians/node.def b/templates/firewall/log-martians/node.def index 4a31e68..cee3e6a 100644 --- a/templates/firewall/log-martians/node.def +++ b/templates/firewall/log-martians/node.def @@ -1,11 +1,28 @@ type: txt -help: Set syslog logging of packets with impossible addresses (default: enable) + +help: Set policy for logging IPv4 packets with invalid addresses + +comp_help:Possible completions: + enable\tEnable logging of IPv4 packets with invalid addresses + disable\tDisable logging of Ipv4 packets with invalid addresses + default: "enable" + syntax:expression: $VAR(@) in "enable", "disable"; "log-martians must be enable or disable" -create:expression: "if [ x$VAR(@) == xenable ]; \ - then sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/all/log_martians\"; \ - else sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/all/log_martians\"; fi" -update:expression: "if [ x$VAR(@) == xenable ]; \ - then sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/all/log_martians\"; \ - else sudo sh -c \"echo 0 > /proc/sys/net/ipv4/conf/all/log_martians\"; fi" -delete:expression: "sudo sh -c \"echo 1 > /proc/sys/net/ipv4/conf/all/log_martians\"" + +create: + if [ x$VAR(@) == xenable ]; then + sudo sh -c "echo 1 > /proc/sys/net/ipv4/conf/all/log_martians" + else + sudo sh -c "echo 0 > /proc/sys/net/ipv4/conf/all/log_martians" + fi + +update: + if [ x$VAR(@) == xenable ]; then + sudo sh -c "echo 1 > /proc/sys/net/ipv4/conf/all/log_martians" + else + sudo sh -c "echo 0 > /proc/sys/net/ipv4/conf/all/log_martians" + fi + +delete: + sudo sh -c "echo 1 > /proc/sys/net/ipv4/conf/all/log_martians" |