summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-12-31 09:34:47 +0100
committerDaniil Baturin <daniil@baturin.org>2018-12-31 09:34:47 +0100
commitc0b4afc7007baff99e53508f00d6bfd0242b0365 (patch)
tree7c9aefc17eefd59e2cbe5630ae19efa483a1f53c
parent4daf13e96ef00fea7ad2655138c30c3f3c459cd7 (diff)
downloadvyatta-conntrack-c0b4afc7007baff99e53508f00d6bfd0242b0365.tar.gz
vyatta-conntrack-c0b4afc7007baff99e53508f00d6bfd0242b0365.zip
T1141: enable conntrack helper in modprobe options.
-rw-r--r--etc/modprobe.d/vyatta_nf_conntrack.conf2
-rwxr-xr-xscripts/check-params-on-reboot.d/conntrack-hash-size12
-rw-r--r--templates-cfg/system/conntrack/hash-size/node.def2
-rw-r--r--templates-cfg/system/conntrack/node.def2
4 files changed, 7 insertions, 11 deletions
diff --git a/etc/modprobe.d/vyatta_nf_conntrack.conf b/etc/modprobe.d/vyatta_nf_conntrack.conf
index c685d1c..3b43793 100644
--- a/etc/modprobe.d/vyatta_nf_conntrack.conf
+++ b/etc/modprobe.d/vyatta_nf_conntrack.conf
@@ -18,4 +18,4 @@
# Description: Sets hash size for connection tracking table
# As of 2.6.33: "expect_hashsize" is readonly
-options nf_conntrack hashsize=32768
+options nf_conntrack hashsize=32768 nf_conntrack_helper=1
diff --git a/scripts/check-params-on-reboot.d/conntrack-hash-size b/scripts/check-params-on-reboot.d/conntrack-hash-size
index c3d7c41..a188e0f 100755
--- a/scripts/check-params-on-reboot.d/conntrack-hash-size
+++ b/scripts/check-params-on-reboot.d/conntrack-hash-size
@@ -25,12 +25,8 @@ if [ -z "$cthash_cfg" ]; then
cthash_cfg=32768 # default hashsize value that Vyatta ships
fi
-if ! grep -q "nf_conntrack hashsize=$cthash_cfg$" \
- /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=$cthash_cfg >> \
- /etc/modprobe.d/vyatta_nf_conntrack.conf"
+grep -q "nf_conntrack hashsize=$cthash_cfg" /etc/modprobe.d/vyatta_nf_conntrack.conf
+if [ $? != 0 ]; 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=$cthash_cfg nf_conntrack_helper=1 >> /etc/modprobe.d/vyatta_nf_conntrack.conf"
fi
-
diff --git a/templates-cfg/system/conntrack/hash-size/node.def b/templates-cfg/system/conntrack/hash-size/node.def
index b70d407..8e702c7 100644
--- a/templates-cfg/system/conntrack/hash-size/node.def
+++ b/templates-cfg/system/conntrack/hash-size/node.def
@@ -12,7 +12,7 @@ update:
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(@) >> \
+ sudo sh -c "echo options nf_conntrack hashsize=$VAR(@) nf_conntrack_helper=1 >> \
/etc/modprobe.d/vyatta_nf_conntrack.conf"
echo "Updated conntrack hash size. This change will take affect when the system is rebooted."
fi
diff --git a/templates-cfg/system/conntrack/node.def b/templates-cfg/system/conntrack/node.def
index 0e93b52..acffd98 100644
--- a/templates-cfg/system/conntrack/node.def
+++ b/templates-cfg/system/conntrack/node.def
@@ -13,7 +13,7 @@ delete: # set conntrack table size to standard 262144 entries if conntrack setti
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=32768 >> \
+ sudo sh -c "echo options nf_conntrack hashsize=32768 nf_conntrack_helper=1 >> \
/etc/modprobe.d/vyatta_nf_conntrack.conf"
echo "Conntrack hash size set to default 32768. This change will take effect when the system is rebooted."
fi