summaryrefslogtreecommitdiff
path: root/templates/system/conntrack/hash-size
diff options
context:
space:
mode:
authorDaniil Baturin <daniil.baturin@vyatta.com>2011-11-04 04:46:00 +0700
committerDaniil Baturin <daniil.baturin@vyatta.com>2011-11-04 04:46:00 +0700
commit410023fd604af49434ed5039c99c7ee6abc99b20 (patch)
tree74e703e1d778db8ace3796c3d1fdf528b302abe7 /templates/system/conntrack/hash-size
downloadvyatta-conntrack-debian/0.1.tar.gz
vyatta-conntrack-debian/0.1.zip
Initial commit.debian/0.1
Diffstat (limited to 'templates/system/conntrack/hash-size')
-rw-r--r--templates/system/conntrack/hash-size/node.def18
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/system/conntrack/hash-size/node.def b/templates/system/conntrack/hash-size/node.def
new file mode 100644
index 0000000..242d0fe
--- /dev/null
+++ b/templates/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