summaryrefslogtreecommitdiff
path: root/templates-cfg/system/conntrack/hash-size
diff options
context:
space:
mode:
authorDaniil Baturin <daniil.baturin@vyatta.com>2011-11-04 05:55:45 +0700
committerDaniil Baturin <daniil.baturin@vyatta.com>2011-11-04 05:55:45 +0700
commite59537545e40756a893134c25eff533ccce3adb8 (patch)
tree85110d89d4ea23c2650b0d0f42b3cbd32a150dd9 /templates-cfg/system/conntrack/hash-size
parent174565005c06c4b7cc6f64b977f63f87b9bd75df (diff)
downloadvyatta-conntrack-e59537545e40756a893134c25eff533ccce3adb8.tar.gz
vyatta-conntrack-e59537545e40756a893134c25eff533ccce3adb8.zip
Move templates t templates-cfg to let op mode templates also exist.
Diffstat (limited to 'templates-cfg/system/conntrack/hash-size')
-rw-r--r--templates-cfg/system/conntrack/hash-size/node.def18
1 files changed, 18 insertions, 0 deletions
diff --git a/templates-cfg/system/conntrack/hash-size/node.def b/templates-cfg/system/conntrack/hash-size/node.def
new file mode 100644
index 0000000..242d0fe
--- /dev/null
+++ b/templates-cfg/system/conntrack/hash-size/node.def
@@ -0,0 +1,18 @@
+help: Hash size for connection tracking table
+type: u32
+
+default: 4096
+
+val_help: u32:1-50000000; Size of hash to use for connection tracking table
+
+syntax:expression: ($VAR(@) >= 1 && $VAR(@) <= 50000000) ; "Value must be between 1 and 50000000"
+
+update:
+ if ! grep -q "nf_conntrack hashsize=$VAR(@)$" /etc/modprobe.d/vyatta_nf_conntrack.conf
+ then
+ sudo sh -c "sed -i -e '/options nf_conntrack hashsize/d' \
+ /etc/modprobe.d/vyatta_nf_conntrack.conf"
+ sudo sh -c "echo options nf_conntrack hashsize=$VAR(@) >> \
+ /etc/modprobe.d/vyatta_nf_conntrack.conf"
+ echo "Updated conntrack hash size. This change will take affect when the system is rebooted."
+ fi